diff options
author | Nicolas François <nicolas.francois@centraliens.net> | 2013-08-21 00:50:09 +0200 |
---|---|---|
committer | Nicolas François <nicolas.francois@centraliens.net> | 2013-08-21 00:51:21 +0200 |
commit | ad1ecc897b4168f36ef0cb048ebea101015521c8 (patch) | |
tree | c3f8c1f82ee65f3f66306bd9c5e2e852a06ebc95 | |
parent | 1e54da26512fef3f1ebe075bfb4dc9bdbba4bf76 (diff) |
Suspend su with the signal which stopped the childsu-c_tty
* src/su.c: Suspend su with the signal which stopped the child
instead of always SIGSTOP.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/su.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2013-08-21 Nicolas François <nicolas.francois@centraliens.net> + + * src/su.c: Suspend su with the signal which stopped the child + instead of always SIGSTOP. + 2013-08-20 Nicolas François <nicolas.francois@centraliens.net> * src/su.c: call handle_session() before changing the UID so that @@ -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; |