diff options
author | Christopher Faylor <me@cgf.cx> | 2003-08-19 04:10:42 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2003-08-19 04:10:42 +0000 |
commit | 05cb7b17cb29a2ac4dd3b1f1bc49073ccc81e89b (patch) | |
tree | 9ecc4cfb6c783843e77b6068b7fc8c734c40c639 /winsup/cygwin/exceptions.cc | |
parent | 755f575f155dbbb0496b9d94363e8177312b49cd (diff) | |
download | cygnal-05cb7b17cb29a2ac4dd3b1f1bc49073ccc81e89b.tar.gz cygnal-05cb7b17cb29a2ac4dd3b1f1bc49073ccc81e89b.tar.bz2 cygnal-05cb7b17cb29a2ac4dd3b1f1bc49073ccc81e89b.zip |
Throughout, eliminate argument to sig_dispatch_pending.
* exceptions.cc (setup_handler): Move non-interruptible condition handling
(back) to wait_sig (as suggested by Pierre Humblet).
(set_process_mask): Don't worry about calling sig_dispatch_pending from
sigthread since it is detected in the function anyway.
(sig_handle): Eliminate thisproc arg. Don't call sig_dispatch_pending on
SIGCONT since that should happen automatically.
* sigproc.cc (sig_dispatch_pending): Eliminate justwake argument. Just return
when called from sigthread.
(wait_sig): Change some variables to bool. Change inner while to an if. Move
uninterruptible signal handling here.
(sigproc_terminate): Don't call sig_dispatch_pending. Just increment semaphore
on exit.
* speclib: Use slightly different (but still flawed) method for determining
symbols to extract from libraries.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index b330a29b2..dea7c8b3e 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -569,7 +569,7 @@ stack (void) int __stdcall handle_sigsuspend (sigset_t tempmask) { - sig_dispatch_pending (0); + sig_dispatch_pending (); sigframe thisframe (mainthread); sigset_t oldmask = myself->getsigmask (); // Remember for restoration @@ -901,14 +901,6 @@ setup_handler (int sig, void *handler, struct sigaction& siga) SetThreadPriority (GetCurrentThread (), WAIT_SIG_PRIORITY); sigproc_printf ("signal successfully delivered"); } - else - { - pending_signals = 1; /* FIXME: Probably need to be more tricky here */ - sig_set_pending (sig); - sig_dispatch_pending (1); - low_priority_sleep (SLEEP_0_STAY_LOW); /* Hopefully, other process will be waking up soon. */ - sigproc_printf ("couldn't send signal %d", sig); - } sigproc_printf ("returning %d", interrupted); return interrupted; @@ -990,7 +982,7 @@ 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 && GetCurrentThreadId () != sigtid) + if (oldmask != newmask) sig_dispatch_pending (); else sigproc_printf ("not calling sig_dispatch_pending. sigtid %p current %p", @@ -999,7 +991,7 @@ set_process_mask (sigset_t newmask) } int __stdcall -sig_handle (int sig, bool thisproc) +sig_handle (int sig) { int rc = 0; @@ -1034,7 +1026,9 @@ sig_handle (int sig, bool thisproc) if (stopped) SetEvent (sigCONT); /* process pending signals */ - sig_dispatch_pending (1); +#if 0 // FIXME? + sig_dispatch_pending (); +#endif } #if 0 @@ -1046,7 +1040,7 @@ sig_handle (int sig, bool thisproc) if (handler == (void *) SIG_DFL) { if (sig == SIGCHLD || sig == SIGIO || sig == SIGCONT || sig == SIGWINCH - || sig == SIGURG || (thisproc && hExeced && sig == SIGINT)) + || sig == SIGURG || (hExeced && sig == SIGINT)) { sigproc_printf ("default signal %d ignored", sig); goto done; |