]> sourceware.org Git - newlib-cygwin.git/blobdiff - winsup/cygwin/exceptions.cc
* exceptions.cc (set_process_mask): Set pending signals only when signals
[newlib-cygwin.git] / winsup / cygwin / exceptions.cc
index c63ed20584e08540d2cb9d28cdff76cae7351994..feffcd3d2b95e6018ad657084f54edbf4a267008 100644 (file)
@@ -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;
 }
 
This page took 0.023899 seconds and 5 git commands to generate.