This is the mail archive of the cygwin-patches@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: [Patch]: Setting the winpid in pinfo


At 12:11 AM 9/11/2004 -0400, Christopher Faylor wrote:
>On Fri, Sep 10, 2004 at 11:13:37PM -0400, Pierre A. Humblet wrote:
>>>If the child process has not become fully awake yet it should just exit
now.
>>
>>Not if it is destined to ignore ^C. The group leader will wait until the 
>>[grand]child has grown up and its sendsig is != NULL, and then send the
>>signal.
>>The child will then handle it properly.
>>
>>The motivation for looking at this was
>><http://cygwin.com/ml/cygwin/2004-07/msg01120.html>, as well as personal
>>observations. I have run thousands of tests and eveything has gone well.
>
>I think I would be more comfortable with deferring signals around a fork.
>It seems like that is the right way to handle this.  Then the parent would
>not disappear mysteriously and there would be no need to have the child
>wait for the parent.  Your exceptions.cc change would still be required,
>however.
>
>There currently is no way to stop signals from being delivered but it
>is trivial to add something.
>
>Wouldn't that solve this problem?

It would. 
In fact the way signals are delivered is current asymmetric:
- Default actions are handled by the sigthread asynchronously of the
mainthread.
- Signals that require a handler have to wait until the mainthread is ready.
It may be advantageous/cleaner (this is a generalization of what you
suggest for
fork) to also wait for the mainthread to take default actions.
For example, that would also prevent a process from being killed while
exec'ing,
while the baby is still suspended. Of course an exec stub should still handle
the signal, somehow, although you expressed other ideas earlier in this
thread.

Pierre

P.S.: See also the Rationale at the bottom of
http://www.opengroup.org/onlinepubs/009695399/


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