diff options
author | Karel Zak | 2014-02-17 13:22:30 +0100 |
---|---|---|
committer | Karel Zak | 2014-02-17 13:22:30 +0100 |
commit | 270ab78a0c84a0d580d3dfa257813abbba385687 (patch) | |
tree | 94ff8cd7e78be5f529998384aedb49637e13aa17 /login-utils/su-common.c | |
parent | libmount: make the mountinfo parser more robust (diff) | |
download | kernel-qcow2-util-linux-270ab78a0c84a0d580d3dfa257813abbba385687.tar.gz kernel-qcow2-util-linux-270ab78a0c84a0d580d3dfa257813abbba385687.tar.xz kernel-qcow2-util-linux-270ab78a0c84a0d580d3dfa257813abbba385687.zip |
su: don't use kill(0, ...) when propagate signal
The current code uses kill(0, caught_signal) after regular
signal cleanup and before exit (all just to make shells happy).
Unfortunately, kill(0, ...) is a bad idea. It seems better to use
kill(getpid(), ...) otherwise we kill our parent process too.
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1063887
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils/su-common.c')
-rw-r--r-- | login-utils/su-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/login-utils/su-common.c b/login-utils/su-common.c index 7fd2792fd..2766a6033 100644 --- a/login-utils/su-common.c +++ b/login-utils/su-common.c @@ -415,7 +415,7 @@ create_watching_parent (void) caught_signal = SIGKILL; break; } - kill(0, caught_signal); + kill(getpid(), caught_signal); } exit (status); } |