diff options
author | Karel Zak | 2019-03-06 12:02:30 +0100 |
---|---|---|
committer | Karel Zak | 2019-03-06 12:02:30 +0100 |
commit | 5932ef81deb0b823ffa52bc6206cdd3c583bb4e9 (patch) | |
tree | 155589f58d5aa06ce98eee6488b60bc428ff05fb /login-utils | |
parent | su: fix --pty terminal initialization (diff) | |
download | kernel-qcow2-util-linux-5932ef81deb0b823ffa52bc6206cdd3c583bb4e9.tar.gz kernel-qcow2-util-linux-5932ef81deb0b823ffa52bc6206cdd3c583bb4e9.tar.xz kernel-qcow2-util-linux-5932ef81deb0b823ffa52bc6206cdd3c583bb4e9.zip |
su: be sensitive to another SIGCHLD ssi_codes
See the same issue for script: 27afe5016842c22d256ea9f88b598d637ca0df84
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'login-utils')
-rw-r--r-- | login-utils/su-common.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/login-utils/su-common.c b/login-utils/su-common.c index bf4a47126..1662d21bb 100644 --- a/login-utils/su-common.c +++ b/login-utils/su-common.c @@ -437,7 +437,10 @@ static int pty_handle_signal(struct su_context *su, int fd) /* The child terminated or stopped. Note that we ignore SIGCONT * here, because stop/cont semantic is handled by wait_for_child() */ - if (info.ssi_code == CLD_EXITED || info.ssi_status == SIGSTOP) + if (info.ssi_code == CLD_EXITED + || info.ssi_code == CLD_KILLED + || info.ssi_code == CLD_DUMPED + || info.ssi_status == SIGSTOP) wait_for_child(su); /* The child is dead, force poll() timeout. */ if (su->child == (pid_t) -1) |