Signal handling tune up.

Pierre A. Humblet pierre@phumblet.no-ip.org
Sun Aug 31 21:38:00 GMT 2003


At 05:06 PM 8/31/2003 -0400, you wrote:
>On Sun, Aug 31, 2003 at 04:48:10PM -0400, Pierre A. Humblet wrote:
>>Sorry I misunderstood. Exactly where did you add a Sleep?
>
>In sig_dispatch_pending after the sigframe.

sig_dispatch_pending wasn't meant for that (unlikely when no 
Sleep) case.

During the Sleep, the sigthread will setup the interrupt in
sigsave (spoofing the first interruptible address, e.g.
the return from write) but it will not set pending_signals.
Thus sig_dispatch_pending won't send SIGFLUSH.

sig_dispatch_pending was meant for the case where the sigthread
had been unable to interrupt, e.g. because it couldn't catch
the mainthread in an interruptible state (without a sigframe),
before the call to sig_dispatch_pending.

Huh, I should have reupdated cvs. You have already done the right
thing to handle this kind of event. 

Pierre



More information about the Cygwin-patches mailing list