* main.c (sigchld_handler_no_subshell) [linux]: SIGTSTP is

always defined on Linux.
* subshell.c (sigchld_handler): No need to use SIGTSTP
explicitly when we really care about SIGCONT.
This commit is contained in:
Pavel Roskin 2002-08-09 23:36:06 +00:00
parent 5a6b3d6b61
commit b7cdfa9c93
3 changed files with 12 additions and 9 deletions

View File

@ -1,5 +1,10 @@
2002-08-09 Pavel Roskin <proski@gnu.org> 2002-08-09 Pavel Roskin <proski@gnu.org>
* main.c (sigchld_handler_no_subshell) [linux]: SIGTSTP is
always defined on Linux.
* subshell.c (sigchld_handler): No need to use SIGTSTP
explicitly when we really care about SIGCONT.
* ncurses.patch: Remove, it's obsolete. * ncurses.patch: Remove, it's obsolete.
* Makefile.am: Remove ncurses.patch. * Makefile.am: Remove ncurses.patch.

View File

@ -2165,13 +2165,10 @@ sigchld_handler_no_subshell (int sig)
if (pid == cons_saver_pid){ if (pid == cons_saver_pid){
#ifdef SIGTSTP if (WIFSTOPPED (status)) {
if (WIFSTOPPED (status))
/* Someone has stopped cons.saver - restart it */ /* Someone has stopped cons.saver - restart it */
kill (pid, SIGCONT); kill (pid, SIGCONT);
else } else {
#endif /* SIGTSTP */
{
/* cons.saver has died - disable console saving */ /* cons.saver has died - disable console saving */
handle_console (CONSOLE_DONE); handle_console (CONSOLE_DONE);
console_flag = 0; console_flag = 0;

View File

@ -894,12 +894,13 @@ void sigchld_handler (int sig)
if (WIFSTOPPED (status)) if (WIFSTOPPED (status))
{ {
if (WSTOPSIG (status) == SIGTSTP) if (WSTOPSIG (status) == SIGSTOP) {
/* The user has suspended the subshell. Revive it */
kill (subshell_pid, SIGCONT);
else
/* The subshell has received a SIGSTOP signal */ /* The subshell has received a SIGSTOP signal */
subshell_stopped = TRUE; subshell_stopped = TRUE;
} else {
/* The user has suspended the subshell. Revive it */
kill (subshell_pid, SIGCONT);
}
} }
else /* The subshell has either exited normally or been killed */ else /* The subshell has either exited normally or been killed */
{ {