More spawn & Windows processes

Pierre A. Humblet Pierre.Humblet@ieee.org
Tue Dec 28 00:07:00 GMT 2004


At 06:57 PM 12/27/2004 -0500, Christopher Faylor wrote:
>On Mon, Dec 27, 2004 at 02:34:05PM -0500, Pierre A. Humblet wrote:
>>You could also set the pipe as inheritable for execs, as proposed
>>earlier.  That makes sync_proc_pipe unnecessary.  Having a
>>"set_proc_pipe_inheritance" would not be any more complicated (code
>>wise).  It would also not be slower than duplicating the pipe into the
>>exec'ed process.
>
>Making the pipe inheritable brings us back to the scenario of having a
>parent process wait for all children of an exec'ed non-cygwin process.  I'd
>rather avoid that now that we have a way to avoid it.

I had in mind what we discussed earlier.
On spawn and fork, duplicate the pipe non inheritable (as today).
Make it inheritable just before an exec. When starting the execed process
make it non inheritable again.
You objected that it had to be made non inheritable on exec CreateProcess
failure. That's true, but it looks like a small price to pay,
compared to starting suspended.

Pierre




More information about the Cygwin-developers mailing list