diff --git a/ChangeLog b/ChangeLog index 0083e807..920fb086 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-08-21 Nicolas François + + * src/su.c: Suspend su with the signal which stopped the child + instead of always SIGSTOP. + 2013-08-20 Nicolas François * src/su.c: call handle_session() before changing the UID so that diff --git a/src/su.c b/src/su.c index 3dd19951..34f67712 100644 --- a/src/su.c +++ b/src/su.c @@ -477,7 +477,7 @@ static void handle_session (const struct passwd *pw) && (0 != WIFSTOPPED (status))) { /* The child (shell) was suspended. * Suspend su. */ - kill (getpid (), SIGSTOP); + kill (getpid (), WSTOPSIG (status)); /* wake child when resumed */ kill (pid, SIGCONT); stop = false;