delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/06/07/23:14:18

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" <cygwin32-developers AT cygnus DOT com>,
"'Christopher G. Faylor'" <cgf AT cygnus DOT com>

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019