Re: Bug in #! processing - "pear broken on current"

From: Garance A Drosihn (drosih_at_rpi.edu)
Date: 06/20/05

  • Next message: M. Warner Losh: "Re: [DCR] Remove devstat"
    Date: Mon, 20 Jun 2005 03:46:45 -0400
    To: Roman Neuhauser <neuhauser@sigpipe.cz>, Dag-Erling Sm?rgrav <des@des.no>
    
    

    At 11:08 AM +0200 6/13/05, Roman Neuhauser wrote:
    ># des@des.no / 2005-06-10 14:19:09 +0200:
    >> Roman Neuhauser <neuhauser@sigpipe.cz> writes:
    >> > That simply shows that all these *Linux* distros don't handle
    >> > shebang lines well.
    >>
    >> Actually, it shows that they handle shebang lines *correctly*, and
    >> that we don't unilaterally break Pear by aligning ourselves with them.
    >
    > These two were identical before:
    >
    > #!/usr/local/bin/php -n -q -dsafe_mode=0 -doutput_buffering=1
    > % /usr/local/bin/php -n -q -dsafe_mode=0 -doutput_buffering=1
    >
    > These two are identical now:
    >
    > #!/usr/local/bin/php -n -q -dsafe_mode=0 -doutput_buffering=1
    > % /usr/local/bin/php "-n -q -dsafe_mode=0 -doutput_buffering=1"
    >
    > Obviously, "correct" is whatever behavior we declare as such.
    > But is the latter actually useful? The Linux distros you
    > shown hacking around the shebang parsing limitations (forking
    > another shell to achieve the correct parsing) shows just that:
    > Linux distros basically avoiding anything above the simplest
    > "#!/bin/sh".

    Note that there is a history behind all this, and it's due to that
    history that FreeBSD's previous behavior is wrong. And it is wrong
    because it meant that some scripts which used to work on FreeBSD
    cannot be made to work on other OS's, and it also meant that some
    scripts that work on other OS's could not be made to work under
    the previous behavior of FreeBSD's kernel.

    Believe me, I've wasted a lot more hours than I would care to count
    investigating this very topic in the last six months. If there was
    any way I could have justified keeping the previous FreeBSD behavior,
    I would have. I ended up breaking some of my *own* scripts when I
    made that change!

    But now that I've come up with these changes to `env', I'm kinda
    happy about how the whole thing turned out. Now if we could just
    convince other OS's to pick up those changes! They could do that
    without breaking any of their current scripts, too.

    -- 
    Garance Alistair Drosehn            =   gad@gilead.netel.rpi.edu
    Senior Systems Programmer           or  gad@freebsd.org
    Rensselaer Polytechnic Institute    or  drosih@rpi.edu
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
    

  • Next message: M. Warner Losh: "Re: [DCR] Remove devstat"

    Relevant Pages

    • Re: strange behaviour of "mv" command
      ... if it does you have an alias of "mv" that is breaking the ... Aliases aren't normally expanded in scripts -- I think you have to go ...
      (comp.unix.shell)
    • Re: How to wrap text in

      tag if the text has no spaces and is very long
      ... I don't think any browser even tries to get close to implementing ... Unicode line breaking rules or even a simplification of them. ... different scripts used for languages you aren't familiar with yourself, ...
      (comp.infosystems.www.authoring.stylesheets)

    • Re: About Tcl syntax...
      ... I accept that there isn't a neat way to implement this facility ... without the possibility of breaking some scripts. ... unnecessarily broke more scripts than inevitable, ...
      (comp.lang.tcl)
    • SUMMARY and apology Re: Some bash/tty questions
      ... Some people tend to create complex login scripts ... If you don't allow direct login to root, but rather su to root, then so ... Hi, not to bash down on bash, but perhaps you should try zsh, it has the shared history thing built in. ...
      (SunManagers)
    • Re: Switching from tcsh to bash as an interactive shell
      ... I have so many scripts, that finding the one I want takes ... You only need a history of 1. ... Ever hear of throw-away code? ... one-line shell scripts. ...
      (comp.os.linux.misc)