* autoload.cc (LoadDLLinitfunc): Remove debugging statement.

* exceptions.cc (sig_handle_tty_stop): Move setting of PID_STOPPED to earlier
in interrupt.
((interrupt_setup): i.e., here.
(sig_handle): Don't queue multiple SIGSTOPS.
* fhandler.h (bg_check_types): Enumerate return value of bg_check for clarity.
* signal.cc (kill_pgrp): Minor cleanup.
* fhandler_termios.cc (fhandler_termios::bg_check): Use enumerated type for
function return.  Don't raise signal if a signal is already queued.
* fhandler_console.cc (fhandler_console::read): Use enumerated return type for
bg_check.
* select.cc: Ditto, throughout.
* read.cc: Ditto, throughout.
* termios.cc: Ditto, throughout.
(_read): YA interrupt detect simplification.
* wait.cc (wait4): Ditto.
This commit is contained in:
Christopher Faylor
2001-01-17 14:57:09 +00:00
parent cb503978ab
commit a7cde2b98a
13 changed files with 109 additions and 65 deletions

View File

@@ -51,9 +51,11 @@ wait4 (int intpid, int *status, int options, struct rusage *r)
waitq *w;
HANDLE waitfor;
sigframe thisframe (mainthread);
bool sawsig;
beg:
if (options & ~(WNOHANG | WUNTRACED))
sawsig = 0;
if (options & ~(WNOHANG | WUNTRACED))
{
set_errno (EINVAL);
return -1;
@@ -97,6 +99,7 @@ beg:
if (w->status == -1)
{
set_sig_errno (EINTR);
sawsig = 1;
res = -1;
}
else if (res != WAIT_OBJECT_0)
@@ -110,7 +113,7 @@ beg:
*status = w->status;
done:
if (res < 0 && get_errno () == EINTR && call_signal_handler ())
if (sawsig && call_signal_handler ())
goto beg;
sigproc_printf ("intpid %d, status %p, w->status %d, options %d, res %d",
intpid, status, w->status, options, res);