* 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.
This commit is contained in:
Christopher Faylor
2001-04-01 00:06:17 +00:00
parent ab57d14639
commit f611148366
7 changed files with 156 additions and 122 deletions

View File

@ -736,7 +736,7 @@ sig_send (_pinfo *p, int sig, DWORD ebp)
if (!wait_for_completion)
{
rc = WAIT_OBJECT_0;
sigproc_printf ("Not waiting for sigcomplete. its_me %d sig %d", its_me, sig);
sigproc_printf ("Not waiting for sigcomplete. its_me %d signal %d", its_me, sig);
if (!its_me)
ForceCloseHandle (thiscatch);
}
@ -765,7 +765,7 @@ sig_send (_pinfo *p, int sig, DWORD ebp)
{
/* It's an error unless sig_loop_wait == 0 (the process is exiting). */
if (!no_signals_available ())
system_printf ("wait for sig_complete event failed, sig %d, rc %d, %E",
system_printf ("wait for sig_complete event failed, signal %d, rc %d, %E",
sig, rc);
set_errno (ENOSYS);
rc = -1;
@ -1144,7 +1144,7 @@ wait_sig (VOID *)
(sigismember (&myself->getsigmask (), sig) ||
(sig != SIGCONT && ISSTATE (myself, PID_STOPPED))))
{
sigproc_printf ("sig %d blocked", sig);
sigproc_printf ("signal %d blocked", sig);
break;
}