diff --git a/src/ChangeLog b/src/ChangeLog index fea196e3f..508ec0dba 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2002-08-09 Pavel Roskin + * 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. * Makefile.am: Remove ncurses.patch. diff --git a/src/main.c b/src/main.c index 93628a243..8dd534cfc 100644 --- a/src/main.c +++ b/src/main.c @@ -2165,13 +2165,10 @@ sigchld_handler_no_subshell (int sig) if (pid == cons_saver_pid){ -#ifdef SIGTSTP - if (WIFSTOPPED (status)) + if (WIFSTOPPED (status)) { /* Someone has stopped cons.saver - restart it */ kill (pid, SIGCONT); - else -#endif /* SIGTSTP */ - { + } else { /* cons.saver has died - disable console saving */ handle_console (CONSOLE_DONE); console_flag = 0; diff --git a/src/subshell.c b/src/subshell.c index 10150f2a1..d8194a8c1 100644 --- a/src/subshell.c +++ b/src/subshell.c @@ -894,12 +894,13 @@ void sigchld_handler (int sig) if (WIFSTOPPED (status)) { - if (WSTOPSIG (status) == SIGTSTP) - /* The user has suspended the subshell. Revive it */ - kill (subshell_pid, SIGCONT); - else + if (WSTOPSIG (status) == SIGSTOP) { /* The subshell has received a SIGSTOP signal */ 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 */ {