Re: execve for script don't return ENOEXEC, bug ?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Newall
Date: Friday, March 19, 2010 - 5:37 pm

On Thu, 11 Mar 2010 02:56:16 -0800 (PST) Valery Reznic 
<valery_reznic@yahoo.com> wrote:
[...]

I see no circumstance which would make b.sh invoke a.sh (and thus emit 
"It's a.sh"). Are you sure these are the actual scripts and output?

On the other hand, if the output was "It's b.sh", this is compatible 
with many historical versions of UNIX, which assumed /bin/sh to be the 
script interpreter. On
2.6.28-16-generic #55-Ubuntu SMP i686 GNU/Linux I get successful output 
for the following variants of "x.sh":

:
echo worked

and

#!
echo worked

and

#! ./x.sh
echo worked
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
execve for script don't return ENOEXEC, bug ?, Valery Reznic, (Thu Mar 11, 3:56 am)
Re: execve for script don't return ENOEXEC, bug ?, Andrew Morton, (Fri Mar 19, 2:07 pm)
Re: execve for script don't return ENOEXEC, bug ?, David Newall, (Fri Mar 19, 5:37 pm)