* 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.
This commit is contained in:
Christopher Faylor
2003-09-03 14:15:55 +00:00
parent 73b2114815
commit 75119e9980
5 changed files with 64 additions and 38 deletions

View File

@ -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)