Subject: Re: Changing exec's #! behavior
To: None <firstname.lastname@example.org>
From: Christos Zoulas <email@example.com>
Date: 06/13/2000 21:32:09
In article <20000613112959.L691@dr-evil.z.zembu.com>,
Jason R Thorpe <firstname.lastname@example.org> wrote:
> env(1) subsequently complains that it cannot exec "perl -w" because it
> doesn't exist.
> Now, the reason that the -w is seen by perl in the Solaris case is
> because perl *itself* looks at the script for a line that has "#!" and
> "perl" in it, and upon finding it, parses the command line args to
> perl located there itself.
> I've changed NetBSD's exec_script.c to have the Solaris behavior and
> am using it that way in our environment here. But I'd like to get
> comments on this before I commit the change to the master NetBSD
Now I suddenly cannot use an interpreter that has a space in its
filename. What should the kernel do next? Start parsing backslash
and quotes? Then hmm, maybe #!/bin/sh -c echo *.c should be expanded
by the kernel too. Well, I do agree that it is a cute hack that
works in the perl case, but given that the user has control over
the perl script and can turn -w himself on, why change things?
Plus if it only works on Solaris, then we should be following the
general trend, not Solaris.