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