Re: Bug in #! processing

From: Sławek Żak (
Date: 09/30/04

  • Next message: Garrett Wollman: "Re: Bug in #! processing"
    To: "David G. Lawrence" <>
    Date: Thu, 30 Sep 2004 15:16:21 +0200

    "David G. Lawrence" <> writes:

    >> What circular reference? Could you elaborate? The algorithm goes like this:
    >> 1. skip all space till #!
    > The #! is required to be in the first two bytes of the file, so there
    > can't be any spaces before it.

        Oh. Thus in following script:

    thirst<zaks>(1950)% cat
    ps -lp $$

        Which generates following output.
    thirst<zaks>(1949)% ./ /tmp
     1001 31645 31278 0 8 0 1636 1024 wait S+ p5 0:00.00 sh ./

        the interpreter is assumed to be /bin/sh. That's fine with me.

    > I wrote the code you guys are talking about, although I had nothing to do
    > with the commit in rev 1.21. I don't have an opinion on that other than
    > it's been this way in FreeBSD for a long time and I share Ceri's concern
    > that changing it will affect some people.

        By no means I wish to force anyone to fix their scripts for 5.3
        release. Period. I would only like to use Allegro CL in scripts, which
        unfortunately considers -#! valid in argument list and acts accordingly on
        all platforms besides FreeBSD. Some (in)compatibility shim would be
        great. Please! :)


    Sławek Żak : UNIX Systems Administrator : PTC Sp. zoo
    _______________________________________________ mailing list
    To unsubscribe, send any mail to ""

  • Next message: Garrett Wollman: "Re: Bug in #! processing"

    Relevant Pages

    • Re: Bug in #! processing
      ... "David G. Lawrence" writes: ... UID PID PPID CPU PRI NI VSZ RSS MWCHAN STAT TT TIME COMMAND ... all platforms besides FreeBSD. ...
    • Re: sendfile + non local filesystem + lighttpd = EOPNOTSUPP
      ... > David G. Lawrence wrote: ... >> What version of FreeBSD? ... > And the lighttpd version is the latest from the ports, ...
    • Re: Major performance hit with ToS setting
      ... I used SIFTR at the suggestion of Lawrence Stewart who headed the ... CUBIC, it should half the congestion window, not what is happening.. ... FreeBSD 8 means something odd is still going on. ... ToS 32 on the path. ...
    • Re: away
      ... Please, don't leave us, David! ... I have made lots of work in FreeBSD threading work, this includes kernel ... made AIO MP-safe, these are all work-in-progress, but I am sorry, the attack made to me is very harmful, I feel I can not recover from such disaster, working on FreeBSD is no longer fun. ...
    • ps under FreeBSD
      ... I was playing with ps on FreeBSD with kern.ps_showallprocs=0 and I was ... surprised when I have seen that I may see info about running process, ... USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND ...