[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-kernel
Subject:    Re: [RFC][PATCH] scripts with stdin replaced
From:       allbery () kf8nh ! apk ! net
Date:       1999-07-04 14:14:31
[Download RAW message or body]

On  4 Jul, Richard Guenther wrote:
+-----
|  On Sat, 3 Jul 1999, Marcin 'Qrczak' Kowalczyk wrote:
|  > > The following patch extends binfmt_misc to substitute stdin
|  > > of the wrapper with the to be executed binary.
|  > 
|  > Wouldn't be better to open it on a different descriptor and pass
|  > /dev/fd/<something> (or /proc/<pid>/fd/<something> - BTW, which one is
|  > preferred to use?) as the argument? I think that some Unices do that.
|  
|  Do you know which Unices offer such feature and which semantics they
|  choose? I have couple of different machines around, but before
+--->8

I don't know of any others that provide general binfmt_misc-type
functionality (nb. that doesn't mean they don't exist!), but many modern
Unixes that support basic #! capability secure it by passing /dev/fd/n
as the argument to avoid a race condition.  Solaris (2.5+) is one such.

-- 
brandon s. allbery	[os/2][linux][solaris][japh]	 allbery@kf8nh.apk.net
system administrator	     [WAY too many hats]	   allbery@ece.cmu.edu
carnegie mellon / electrical and computer engineering			 KF8NH
     We are Linux. Resistance is an indication that you missed the point.


-
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/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic