mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-18 20:39:33 +08:00
* exceptions.cc (interrupt_setup): Set sigsave.sig last to avoid a race.
This commit is contained in:
parent
d704b32411
commit
2bf794af9a
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user