Bug in #! processing
ceri at submonkey.net
Thu Sep 30 05:10:40 PDT 2004
On Thu, Sep 30, 2004 at 02:05:18PM +0200, S?awek ?ak wrote:
> Ryan Sommers <ryans at gamersimpact.com> writes:
> > Ceri Davies wrote:
> >> That seems wrong too. #! shouldn't be magic anywhere other than at the
> >>beginning of a file.
> > I haven't looked at the code yet, on my list, but I'm guessing this was done to
> > avoid a possible circular reference.
> What circular reference? Could you elaborate? The algorithm goes like this:
> 1. skip all space till #!
> 2. skip #! and read path for the interpreter
> 3. find and split arguments
> 4. invoke intepreter with it's path at argv, arguments at subsequent
> positions and append path to the script at the end.
> That's it, modulo : and no interpreter path at all in the script as legacy
> which is a special case anyway.
#1 in your list doesn't happen.
It is not tinfoil, it is my new skin. I am a robot.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040930/dcd07241/attachment.bin
More information about the freebsd-current