On Tuesday, November 26, 2002, at 01:38 AM, Ken Williams wrote:

On Tuesday, November 26, 2002, at 04:40  PM, Chris wrote:

On Monday, November 25, 2002, at 11:20  PM, Ken Williams wrote:
On Tuesday, November 26, 2002, at 03:38  PM, Chris wrote:
On Monday, November 25, 2002, at 10:09  PM, Ken Williams wrote:
There's nothing perl can do about this - the OS (in fact, the kernel, I think) reads that shebang line in order to know it should call perl. By the time perl gets to look at it, it's too late.
Kernel not involved. Shell looks to determine with which application to launch executable.
The following source says otherwise, as do some knowledgeable unix geeks I've asked ...
I appear to have grossly misunderstood discussion on a different list regarding what the kernel did vs what the shell did. I apologize for worsening the S/N ratio here.

Mea cupla!
No problem, this is the way people learn. Also, the situation is somewhat blurry for historical reasons - the first support for shebang lines *was* in shells, but it's much better to do it at the system level (see a 1980 message from Dennis Ritchie: http://www.uni-ulm.de/~s_smasch/various/shebang/sys1.c.html), so current shells usually don't do this.

On OS X, when I look at 'man tcsh' (most OS X users' default shell) and search for '#!', I see some discussion of it. The shell *can* be compiled with the 'hb' option to emulate the kernel's shebang processing, but on OS X as Apple ships it, this option is not activated.
Use: Http://www.uni-ulm.de/~s_smasch/various/shebang/

As the original URL does not work...

Also the man page for execve describes what is happening.

One hopes that Darwin does not have the old 32 character limit from Tahoe! (BSD 4.2) [See the footnotes to the table for the 3 possible events when the line is too long.]

The page is quite informative... Thanks for the pointer! [although the table is not complete by any means, it brings back memories of LONG nights caused by long path names.]

T.T.F.N.
William H. Magill
# Beige G3 - Rev A motherboard
# Flat-panel iMac (2.1) 800MHz - Super Drive - 768 Meg
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Reply via email to