Signal handling tune up.

Pierre A. Humblet
Wed Aug 20 20:23:00 GMT 2003

Christopher Faylor wrote:

> >While looking at the code, I got worried by interrupt_setup().  As soon
> >as sigsave.sig = sig; is executed, the sigsave can be picked up by a
> >terminating handler.  Thus shouldn't sigsave.sig = sig; be the last
> >statement in interrupt_setup() to avoid a race condition?
> Yes, it's a race but I think it's harmless since, AFAICT, the only thing
> affected is errno which wouldn't be handled in a recursive signal call.
> I'll move the setting to the end of interrupt_setup, though.

There is also the SetEvent (signal_arrived) that must be done before
it's reset in the handler.


More information about the Cygwin-patches mailing list