* 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:
@@ -1,6 +1,6 @@
|
||||
/* fhandler_termios.cc
|
||||
|
||||
Copyright 1996, 1997, 1998 Cygnus Solutions.
|
||||
Copyright 1999, 2000, 2001 Red Hat, Inc.
|
||||
|
||||
This file is part of Cygwin.
|
||||
|
||||
@@ -107,13 +107,13 @@ fhandler_termios::set_ctty (int ttynum, int flags)
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
bg_check_types
|
||||
fhandler_termios::bg_check (int sig)
|
||||
{
|
||||
if (!myself->pgid || tc->getpgid () == myself->pgid ||
|
||||
myself->ctty != tc->ntty ||
|
||||
((sig == SIGTTOU) && !(tc->ti.c_lflag & TOSTOP)))
|
||||
return 1;
|
||||
return bg_ok;
|
||||
|
||||
if (sig < 0)
|
||||
sig = -sig;
|
||||
@@ -128,7 +128,7 @@ fhandler_termios::bg_check (int sig)
|
||||
from reallocating this pty. I think this is the case
|
||||
which is handled by unlockpt on a Unix system. */
|
||||
termios_printf ("closed by master");
|
||||
return 0;
|
||||
return bg_eof;
|
||||
}
|
||||
|
||||
/* If the process group is no more or if process is ignoring or blocks 'sig',
|
||||
@@ -143,16 +143,19 @@ fhandler_termios::bg_check (int sig)
|
||||
else if (!sigs_ignored)
|
||||
/* nothing */;
|
||||
else if (sig == SIGTTOU)
|
||||
return 1; /* Just allow the output */
|
||||
return bg_ok; /* Just allow the output */
|
||||
else
|
||||
goto setEIO; /* This is an output error */
|
||||
|
||||
_raise (sig);
|
||||
return 1;
|
||||
/* Don't raise a SIGTT* signal if we have already been interrupted
|
||||
by another signal. */
|
||||
if (WaitForSingleObject (signal_arrived, 0) != WAIT_OBJECT_0)
|
||||
_raise (sig);
|
||||
return bg_signalled;
|
||||
|
||||
setEIO:
|
||||
set_errno (EIO);
|
||||
return -1;
|
||||
return bg_error;
|
||||
}
|
||||
|
||||
#define set_input_done(x) input_done = input_done || (x)
|
||||
|
Reference in New Issue
Block a user