diff options
author | Christopher Faylor <me@cgf.cx> | 2012-08-15 18:50:44 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2012-08-15 18:50:44 +0000 |
commit | 879f3ad5eefc0cb914e7fed1a219ebb11c995a99 (patch) | |
tree | 3070364adc2f282714d85761bb6c975bd516ffbc /winsup/cygwin/exceptions.cc | |
parent | 588b40e260f180d02c91132821856c12c83fddc2 (diff) | |
download | cygnal-879f3ad5eefc0cb914e7fed1a219ebb11c995a99.tar.gz cygnal-879f3ad5eefc0cb914e7fed1a219ebb11c995a99.tar.bz2 cygnal-879f3ad5eefc0cb914e7fed1a219ebb11c995a99.zip |
* cygtls.h (_cygtls::create_signal_arrived): New function.
(_cygtls::set_signal_arrived): Lock creation of signal_arrived.
* cygwait.cc (cancelable_wait): Ignore signal_arrived event if _my_tls 'sig'
element does not exist.
* exceptions.cc (_cygtls::interrupt_setup): Create signal_arrived if recipient
thread has not created it.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 8df69f29d..6de1f16b9 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -796,8 +796,12 @@ _cygtls::interrupt_setup (int sig, void *handler, struct sigaction& siga) this->sig = sig; // Should always be last thing set to avoid a race - if (incyg && signal_arrived) - SetEvent (signal_arrived); + if (incyg) + { + if (!signal_arrived) + create_signal_arrived (); + SetEvent (signal_arrived); + } proc_subproc (PROC_CLEARWAIT, 1); sigproc_printf ("armed signal_arrived %p, signal %d", signal_arrived, sig); |