From: Nicolas François Date: Tue, 13 Aug 2013 17:42:50 +0000 (+0200) Subject: Reset caught variable when signal is handled by su. X-Git-Tag: 4.2.1~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a5e3dbb0e36444b915bc9c4c295a5e1a84d3918e;p=shadow Reset caught variable when signal is handled by su. * src/su.c: When a SIGTSTP is caught, reset caught to 0. There is no need to kill the child in such case after su is resumed. This remove the "Session terminated, terminating shell... ...terminated." messages in such case. --- diff --git a/ChangeLog b/ChangeLog index c966957d..4d40562a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-08-13 Nicolas François + + * src/su.c: When a SIGTSTP is caught, reset caught to 0. There is + no need to kill the child in such case after su is resumed. This + remove the "Session terminated, terminating shell... + ...terminated." messages in such case. + 2013-08-13 Nicolas François * man/newgidmap.1.xml: Document the checks performed before diff --git a/src/su.c b/src/su.c index 98ea6de3..43f7dc4b 100644 --- a/src/su.c +++ b/src/su.c @@ -347,6 +347,7 @@ static void prepare_pam_close_session (void) 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