This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: More spawn & Windows processes


At 07:22 PM 12/27/2004 -0500, Christopher Faylor wrote:
>On Mon, Dec 27, 2004 at 07:02:37PM -0500, Pierre A. Humblet wrote:
>>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.
>
>If you make the pipe inheritable then cygwin will wait for progeny of
>every non-cygwin process.  That is exactly what the current code is
>trying to avoid.

Good point, for execed non-cygwin processes.
But we can have child_info::sync call alert_parent(0) when it
detects that the child has terminated without setting subproc_ready.
We already know that works on WinME.

Pierre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]