On Fri, Apr 21, 2006 at 10:18:42AM -0500, Bill Allombert wrote:
> On Wed, Apr 19, 2006 at 11:20:23AM +0200, Frank K?ster wrote:
> > >From the reading of the Etch RC Policy you are right - the RMs raised
> > the requirement from a should to a must. On the other hand, they
> > introduced the nice word "appropriate".
> > Release Managers, do you think that scripts with a Perl magic header
> > like
> > ,----
> > | eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q'
> > | if 0;
> > `----
> > are inacceptable?
> > Of course I would never write a maintainer or otherwise Debian-specific
> > script like this; but upstream has a reason for this "trying to be as
> > portable as possible", and I'd rather not patch all instances of magic
> > headers, as long as they work.
> Technically the issue is that the exec(2) system call will not execute
> such scripts because the kernel will not recognize it as such. On the
> other hand, a shell will detect it and fork itself to execute it
> (instead of forking /bin/sh to execute it).
> So unless such script is only meant to be executed from a specific set of
> shells, it is a case where the script does not, in fact, work.
Precisely. Without a shebang, such scripts work only by virtue of the first
line being valid in the current shell -- which is not guaranteed to be the
case. So yeah, that's not really appropriate for a script that's expected
to be callable by a user.
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
vorlon@debian.org http://www.debian.org/
Attachment:
signature.asc
Description: Digital signature