From 75119e9980e160d8766111f40353df61abc8159b Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 3 Sep 2003 14:15:55 +0000 Subject: * exceptions.cc (set_process_mask): Set pending signals only when signals become unmasked. * sigproc.cc (pending_signals): Flip back to a global. (wait_sig): Don't set pending signals when there is an armed semaphore or signal is blocked. * shared.cc (shared_info::initialize): Add a username parameter for user-mode mounts. Reorganize to try to avoid startup race. (memory_init): Move some stuff into shared_info::initialize. * shared_info.h (shared_info::initialize): Change declaration. (CURR_SHARED_MAGIC): Update. --- winsup/cygwin/sigproc.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'winsup/cygwin/sigproc.cc') diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index b14fbac1b..383de21a9 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -147,7 +147,7 @@ muto NO_COPY *sync_proc_subproc = NULL; // Control access to subproc stuff DWORD NO_COPY sigtid = 0; // ID of the signal thread -static bool NO_COPY pending_signals = false; // true if signals pending +bool NO_COPY pending_signals = false; // true if signals pending /* Functions */ @@ -1190,7 +1190,7 @@ wait_sig (VOID *self) { /* If x > 0, we have to deal with a signal at some later point */ if (rc != RC_NOSYNC && x > 0) - pending_signals = true; // There should be an armed semaphore, in this case + /*pending_signals = true*/; // There should be an armed semaphore, in this case if (sig > 0 && sig != SIGKILL && sig != SIGSTOP && (sigismember (&myself->getsigmask (), sig) || @@ -1199,7 +1199,7 @@ wait_sig (VOID *self) { sigproc_printf ("signal %d blocked", sig); x = InterlockedIncrement (myself->getsigtodo (sig)); - pending_signals = true; + /* pending_signals = true;*/ // will be set by set_process_mask } else { @@ -1229,9 +1229,9 @@ wait_sig (VOID *self) sigproc_printf ("Got signal %d", sig); if (!sig_handle (sig)) { + pending_signals = true; saw_failed_interrupt = true; x = InterlockedIncrement (myself->getsigtodo (sig)); - pending_signals = true; } } if (rc == RC_NOSYNC && x > 0) -- cgit v1.2.3