Date: Wed, 16 Feb 2005 09:20:00 +0100 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Garance A Drosehn <gad@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/bin/sh options.c Message-ID: <20050216082000.GH9291@darkness.comp.waw.pl> In-Reply-To: <200502160517.j1G5HwRL083696@repoman.freebsd.org> References: <200502160517.j1G5HwRL083696@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Wed, Feb 16, 2005 at 05:17:58AM +0000, Garance A Drosehn wrote: +> gad 2005-02-16 05:17:58 UTC +> +> FreeBSD src repository +> +> Modified files: +> bin/sh options.c +> Log: +> Change /bin/sh so *it* implements the processing needed for scripts to +> work as expected when they have a "shebang line" of: +> +> #!/bin/sh -- # -*- perl -*- -p +> +> This specific line is recommended in some perl documentation, and I think +> I've seen similar lines in documentation for ruby and python. Those +> write-ups expect `sh' to ignore everything after the '--' if the first +> thing after the '--' is a '#'. See chapter 19, "The Command-Line Interface" +> in 3rd edition of "Programming Perl", for some discussion of why perl +> recommends using this line in some circumstances. +> +> The above line does work on solaris, irix and aix (as three data points), +> and it used to work on FreeBSD by means of a similar patch to execve(). +> However, that change to execve() effected *all* shells (which caused +> other problems), and that processing was recently removed. Thank you! -- Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFCEwIwForvXbEpPzQRAvnHAKCkDLcYnuG2x4WCNHN2xfUt0C06rACfaiH4 mqr2IKBPnCT8wBOmGcPx8W0= =K8jH -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050216082000.GH9291>
