* cygerrno.h (set_errno): Set global errno whenever setting thread specific

version.
* debug.cc (__set_errno): Ditto.
* exceptions.cc (handle_sigsuspend): Remove spurious sig_dispatch_pending call.
(set_signal_mask): When there seem to be pending signals to dispatch, tell
signal_dispatch_pending/sig_send not to specifically call any handlers.
* sigproc.h (sig_dispatch_pending): Change declaration to void.
* sigproc.cc (sig_dispatch_pending): Change definition to void.  Take an
argument to determine whether to tell sig_send to wait for handler to be
called.
* sigproc.cc (sig_send): Don't call signal handler when sig == __SIGFLUSHFAST.
(wait_sig): Honor __SIGFLUSHFAST.  Guard against sigpacket::process nuking
si_signo.
* sigproc.h (__SIGFLUSHFAST): Define new special signal.
(sig_dispatch_pending): Change declaration to void.  Take optional boolean
argument.
* fork.cc (vfork): Add debugging output.
This commit is contained in:
Christopher Faylor
2004-02-01 18:29:12 +00:00
parent f6565cd1a6
commit 9e1ad59de6
7 changed files with 54 additions and 22 deletions

View File

@@ -1,6 +1,6 @@
/* exceptions.cc
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Red Hat, Inc.
Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc.
This file is part of Cygwin.
@@ -591,11 +591,10 @@ stack (void)
int __stdcall
handle_sigsuspend (sigset_t tempmask)
{
sig_dispatch_pending ();
sigset_t oldmask = myself->getsigmask (); // Remember for restoration
set_signal_mask (tempmask &= ~SIG_NONMASKABLE, oldmask);// Let signals we're
// interested in through.
// Let signals we're interested in through.
set_signal_mask (tempmask &= ~SIG_NONMASKABLE, oldmask);
sigproc_printf ("oldmask %p, newmask %p", oldmask, tempmask);
pthread_testcancel ();
@@ -925,11 +924,11 @@ set_signal_mask (sigset_t newmask, sigset_t oldmask)
sigproc_printf ("oldmask %p, newmask %p, mask_bits %p", oldmask, newmask,
mask_bits);
myself->setsigmask (newmask); // Set a new mask
mask_sync->release ();
if (mask_bits)
sig_dispatch_pending ();
sig_dispatch_pending (true);
else
sigproc_printf ("not calling sig_dispatch_pending");
mask_sync->release ();
return;
}