From: sos AT prospect DOT com DOT ru (Sergey Okhapkin) Subject: RE: Foolproof solution for non-inherit on spawn/exec? 7 Jun 1998 23:14:18 -0700 Message-ID: <01BD92C3.B0C10640.cygnus.cygwin32.developers@sos> To: "cygwin32-developers AT cygnus DOT com" , "'Christopher G. Faylor'" Christopher G. Faylor wrote: > How about this for a "foolproof" solution to the problem of inheriting handles? > Don't *ever* create an inheritable handle in the fd table. > > Create the "linearized" fd table prior to spawning a process but do not > populate it with any handle which has a close-on-exec bit set. In the spawned > process, the "delinearize" code will do a DuplicateHandle on every handle that > it needs from the parent process. > > This scenario means that fds opened in a cygwin process are not passed > to a non-cygwin process. I think that's the correct behavior. > > The only downside that I can see is that it means that process startup is > slightly slower. It also means that a forked process will also have to > go through this effort. > -- I don't like this idea... -- Sergey Okhapkin, http://www.lexa.ru/sos Moscow, Russia