diff options
author | Christopher Faylor <me@cgf.cx> | 2001-04-01 04:06:17 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-04-01 04:06:17 +0400 |
commit | f611148366ee3934d16824f8a973177aaece0aa8 (patch) | |
tree | b27e26f288e5497966f358cb47783a1bff9a5d19 /winsup/cygwin/exceptions.cc | |
parent | ab57d1463946e37a5b7ce25498b3b42c3f617666 (diff) |
* sigproc.h (class sigframe): Implement 'unregister()' method.
(sigframe::~sigframe): Use unregister method.
(sigframe::call_signal_handler): Declare new method.
* exceptions.cc (sigframe::call_signal_handler): New method. Unregisters
current sigframe before calling signal handler.
(setup_handler): Clear waiting threads prior to arming signal_arrived.
* syscalls.cc (_read): Change goto to loop. Recalculate sigframe inside of
loop so that constructor is called when appropriate.
* wait.cc (wait4): Ditto.
* signal.cc: Change "sig" to "signal" in debugging messages throughout.
* sigproc.cc: Ditto.
Diffstat (limited to 'winsup/cygwin/exceptions.cc')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 8374032b0..7efba7f05 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -864,10 +864,10 @@ setup_handler (int sig, void *handler, struct sigaction& siga) } else { - res = SetEvent (signal_arrived); // For an EINTR case - sigproc_printf ("armed signal_arrived %p, res %d", signal_arrived, res); /* Clear any waiting threads prior to dispatching to handler function */ proc_subproc (PROC_CLEARWAIT, 1); + res = SetEvent (signal_arrived); // For an EINTR case + sigproc_printf ("armed signal_arrived %p, res %d", signal_arrived, res); } if (th) @@ -1127,6 +1127,13 @@ reset_signal_arrived () sigproc_printf ("reset signal_arrived"); } +int +sigframe::call_signal_handler () +{ + unregister (); + ::call_signal_handler (); +} + int __stdcall call_signal_handler () { |