From: Nicolas François Date: Tue, 20 Aug 2013 00:06:03 +0000 (+0200) Subject: There are no more SIGTSTP signal handler. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=464187d07ed83aeba5654b7834a85e23915338bc;p=thirdparty%2Fshadow.git There are no more SIGTSTP signal handler. * src/su.c: There are no more SIGTSTP signal handler. --- diff --git a/ChangeLog b/ChangeLog index 28fcf1368..4b6d0bbed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-08-20 Nicolas François + + * src/su.c: There are no more SIGTSTP signal handler. + 2013-08-20 Nicolas François * src/su.c: Check for sigfillset() failure. diff --git a/src/su.c b/src/su.c index 47262906c..6f06e83f7 100644 --- a/src/su.c +++ b/src/su.c @@ -465,22 +465,7 @@ static void handle_session (void) pid = waitpid (-1, &status, WUNTRACED); } - /* When interrupted by signal, the signal will be - * forwarded to the child, and termination will be - * forced later. - */ - if ( ((pid_t)-1 == pid) - && (EINTR == errno) - && (SIGTSTP == caught)) { - caught = 0; - /* Except for SIGTSTP, which request to - * stop the child. - * We will SIGSTOP ourself on the next - * waitpid round. - */ - kill (pid_child, SIGSTOP); - stop = false; - } else if ( ((pid_t)-1 != pid && !have_tty) + if ( ((pid_t)-1 != pid && !have_tty) && (0 != WIFSTOPPED (status))) { /* The child (shell) was suspended. * Suspend su. */