diff options
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/exceptions.cc | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b4b12a15c..f3219d0b0 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2003-08-20 Pierre Humblet <pierre.humblet@ieee.org> + + * exceptions.cc (interrupt_setup): Set sigsave.sig last to avoid a + race. + 2003-08-20 Christopher Faylor <cgf@redhat.com> * sigproc.cc (wait_sig): Ensure that myself->getsigtodo array is diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 034e5605d..cff5719cf 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -693,7 +693,6 @@ interrupt_setup (int sig, void *handler, DWORD retaddr, DWORD *retaddr_on_stack, sigsave.newmask = sigsave.oldmask | siga.sa_mask | SIGTOMASK (sig); sigsave.sa_flags = siga.sa_flags; sigsave.func = (void (*)(int)) handler; - sigsave.sig = sig; sigsave.saved_errno = -1; // Flag: no errno to save if (handler == sig_handle_tty_stop) { @@ -703,6 +702,7 @@ interrupt_setup (int sig, void *handler, DWORD retaddr, DWORD *retaddr_on_stack, /* Clear any waiting threads prior to dispatching to handler function */ proc_subproc (PROC_CLEARWAIT, 1); int res = SetEvent (signal_arrived); // For an EINTR case + sigsave.sig = sig; // Should ALWAYS be last thing set to avoid a race sigproc_printf ("armed signal_arrived %p, res %d", signal_arrived, res); } |