Searched hist:141962 (Results 1 - 1 of 1) sorted by relevance

/freebsd-9.3-release/bin/sh/
H A Doptions.cdiff 141962 Wed Feb 16 03:17:58 MST 2005 gad 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.

PR: 16393 (the original request to fix the same issue)
Reviewed by: freebsd-current (looking at a slightly different patch)
MFC after: 1 week

Completed in 55 milliseconds