summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/exceptions.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2004-02-01 18:29:12 +0000
committerChristopher Faylor <me@cgf.cx>2004-02-01 18:29:12 +0000
commit9e1ad59de6cdb91cebc057205dd22c2d1dc73673 (patch)
tree8590c27111eae7a7d0e54d37b3af6b400f79af13 /winsup/cygwin/exceptions.cc
parentf6565cd1a68b4a4b7c43b588513cd802597bc5d3 (diff)
downloadcygnal-9e1ad59de6cdb91cebc057205dd22c2d1dc73673.tar.gz
cygnal-9e1ad59de6cdb91cebc057205dd22c2d1dc73673.tar.bz2
cygnal-9e1ad59de6cdb91cebc057205dd22c2d1dc73673.zip
* 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.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r--winsup/cygwin/exceptions.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index 11088fcfd..4983a2ede 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -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;
}