Bug in #! processing - One More Time
Gordon Tetlow
gordon at tetlows.org
Fri Feb 25 21:04:32 GMT 2005
Garance A Drosihn wrote:
<snip history>
> As I see it, we have the following choices to fix this:
>
> 1) MFC the January 31st change to kern/imgact_shell.c to 5.3-stable,
> as it is. This means we haven't fixed the problem that people
> complained about in 2002 and again in 2004. And I still think
> it is "not appropriate" for the execve() system to be deciding
> what '#' means on that line. The biggest advantage is that this
> means 5.4-release will behave exactly the same as 3.5 through
> 5.3-release have behaved.
>
> 2) Remove '#'-processing from kern/imgact_shell.c, and remove my
> change to bin/sh/options.c (which doesn't work right once we
> do that). This breaks shell-scripts which use the feature as
> documented by perl (and other scripting languages), and fixes
> the problem people complained about in 2002/2004.
>
> 3) Change kern/imgact_shell.c to process shebang options the same
> way other (non-BSD?) operating systems do. By that I mean:
> send the entire string as arg[1], and let the scripting
> language sort it out. This is an incompatible change from
> FreeBSD 5.3 to 5.4, but would put make us "more consistent"
> with other operating systems.
>
> 4) Provide some way for /bin/sh to find out where the shebang
> options end, and the user-specified options begin. This could
> make everyone happy, but it's more work and right now (this
> close to 5.4-release) that wouldn't make me particularly happy...
>
> Or we could do #1 for now, and plan to do #4 after 5.4-release.
> Or do #1 now in 5.3, and go with some incompatible change (#2
> or #3) only in 6.x-current.
I would say we should stick with #1 for the 5.x release and use #3 for
6.x and further. We have already frozen APIs and ABIs. For people that
might have scripts that use this syntax to have problems between minor
releases is unacceptable.
-gordon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20050225/c1473fb3/signature.bin
More information about the freebsd-arch
mailing list