diff options
author | Christopher Faylor <me@cgf.cx> | 2001-09-12 01:56:32 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-09-12 01:56:32 +0000 |
commit | 101f820da27a0aa142df153e35d2890209b49456 (patch) | |
tree | a6c86d186b9cee6915569cd6f1d151bf0afe6f57 /winsup | |
parent | e3c25c4a47ad780d0fec814f0feef537733b27d9 (diff) | |
download | newlib-101f820da27a0aa142df153e35d2890209b49456.zip newlib-101f820da27a0aa142df153e35d2890209b49456.tar.gz newlib-101f820da27a0aa142df153e35d2890209b49456.tar.bz2 |
* sigproc.h (sigframe::unregister): Return true/false whether this frame is
capable of responding to signals.
* exceptions.cc (sigframe::call_signal_handler): Don't call signal handler if
it is not armed for this thread.
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/exceptions.cc | 4 | ||||
-rw-r--r-- | winsup/cygwin/sigproc.h | 20 |
3 files changed, 19 insertions, 12 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 9db5e8c..d5868b3 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +Tue Sep 11 21:55:37 2001 Christopher Faylor <cgf@cygnus.com> + + * sigproc.h (sigframe::unregister): Return true/false whether this + frame is capable of responding to signals. + * exceptions.cc (sigframe::call_signal_handler): Don't call signal + handler if it is not armed for this thread. + Tue Sep 11 11:23:10 2001 Christopher Faylor <cgf@cygnus.com> * cygwin.din: Remove cygwin_getshared. diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index a06774d..bf4a444 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -1142,8 +1142,8 @@ static int __stdcall call_signal_handler_now_dummy () int sigframe::call_signal_handler () { - unregister (); - return call_signal_handler_now (); + return unregister () ? call_signal_handler_now () : 0; + } #define pid_offset (unsigned)(((_pinfo *)NULL)->pid) diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h index 5726a45..38e65fa 100644 --- a/winsup/cygwin/sigproc.h +++ b/winsup/cygwin/sigproc.h @@ -50,17 +50,17 @@ class sigframe { private: sigthread *st; - void unregister () + bool unregister () { - if (st) - { - EnterCriticalSection (&st->lock); - st->frame = 0; - st->exception = 0; - st->release_winapi_lock (); - LeaveCriticalSection (&st->lock); - st = NULL; - } + if (!st) + return 0; + EnterCriticalSection (&st->lock); + st->frame = 0; + st->exception = 0; + st->release_winapi_lock (); + LeaveCriticalSection (&st->lock); + st = NULL; + return 1; } public: |