Date: Mon, 20 Jun 2005 03:46:45 -0400 From: Garance A Drosihn <drosih@rpi.edu> To: Roman Neuhauser <neuhauser@sigpipe.cz>, Dag-Erling Sm?rgrav <des@des.no> Cc: freebsd-ports@freebsd.org, freebsd-arch@freebsd.org Subject: Re: Bug in #! processing - "pear broken on current" Message-ID: <p06210223bedc21850730@[128.113.24.47]> In-Reply-To: <20050613090808.GB1789@isis.sigpipe.cz> References: <200506090027.j590R2t0070899@repoman.freebsd.org> <20050609003619.GA10578@xor.obsecurity.org> <20050609100815.GB16677@over-yonder.net> <p06210258bece1422da20@[128.113.24.47]> <20050609160316.GC16677@over-yonder.net> <p06210259bece1ae26f44@[128.113.24.47]> <20050610062431.GA78875@isis.sigpipe.cz> <86fyvq3c4o.fsf@xps.des.no> <20050610112857.GB80719@isis.sigpipe.cz> <86psuuv1z6.fsf@xps.des.no> <20050613090808.GB1789@isis.sigpipe.cz>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?p06210223bedc21850730>