lkml.org 
[lkml]   [2000]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: #! and argv[0]: the path is removed before invoking the interpreter
In <E12LBjK-0000Xp-00@the-village.bc.nu> Alan Cox (alan@lxorguk.ukuu.org.uk) wrote:
>> I believe the behavior of #! on Solaris goes all the way back to BSD
>> in of the early 80's. FreeBSD 3.0 behaves as Solaris does.
>>
>> I hope this considered a bug. If there willingness to take a patch for
>> it, I might work on making the fix.

> Im not sure about bug, but its certainly worth behaving the same way as
> everyone else in this case if its appropriate to do so. Take a look at
> the fs/binfmt* code and sure - send a patch

IMO it's better be CONSISTENT. Either
1) argv[0] is always the same thing that was passed to execv
or
2) argv[0] is always "realpath" to executable.

Since in case of "real binary" we doing 1) IMNSHO we should do this in case
of script as well...





-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.581 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site