summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/exceptions.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2009-09-19 15:34:19 +0000
committerChristopher Faylor <me@cgf.cx>2009-09-19 15:34:19 +0000
commit50a8741474c249fbc2928b33df2cf47dbe1367b8 (patch)
treeb5635d529189c511afd0133ee800e47d6c2c5375 /winsup/cygwin/exceptions.cc
parent4945cb2af0c264afdc44bc87b15da1b302a28a8b (diff)
downloadcygnal-50a8741474c249fbc2928b33df2cf47dbe1367b8.tar.gz
cygnal-50a8741474c249fbc2928b33df2cf47dbe1367b8.tar.bz2
cygnal-50a8741474c249fbc2928b33df2cf47dbe1367b8.zip
* exceptions.cc (sigpacket::process): Explicitly set thread-specific handler
function to zero to avoid transferring to incorrect location. (_cygtls::call_signal_handler): Don't transfer to handler if there is no handler to transfer to.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r--winsup/cygwin/exceptions.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc
index a66644cc7..9d8de7570 100644
--- a/winsup/cygwin/exceptions.cc
+++ b/winsup/cygwin/exceptions.cc
@@ -1298,6 +1298,7 @@ done:
thread_specific:
use_tls->sig = si.si_signo;
use_tls->set_siginfo (this);
+ use_tls->func = NULL;
sigproc_printf ("releasing sigwait for thread");
SetEvent (use_tls->event);
goto done;
@@ -1374,7 +1375,7 @@ _cygtls::call_signal_handler ()
{
int this_sa_flags = 0;
/* Call signal handler. */
- while (sig)
+ while (sig && func)
{
lock ();
this_sa_flags = sa_flags;