summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/exceptions.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r--winsup/cygwin/exceptions.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index c63ed2058..feffcd3d2 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -963,11 +963,15 @@ set_process_mask (sigset_t newmask)
sigproc_printf ("old mask = %x, new mask = %x", myself->getsigmask (), newmask);
myself->setsigmask (newmask); // Set a new mask
mask_sync->release ();
- if (oldmask != newmask)
- sig_dispatch_pending ();
- else
+ if (!(oldmask & ~newmask))
sigproc_printf ("not calling sig_dispatch_pending. sigtid %p current %p",
sigtid, GetCurrentThreadId ());
+ else
+ {
+ extern bool pending_signals;
+ pending_signals = true;
+ sig_dispatch_pending ();
+ }
return;
}