]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
su: be sensitive to another SIGCHLD ssi_codes
authorKarel Zak <kzak@redhat.com>
Wed, 6 Mar 2019 11:02:30 +0000 (12:02 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 6 Mar 2019 11:02:30 +0000 (12:02 +0100)
See the same issue for script: 27afe5016842c22d256ea9f88b598d637ca0df84

Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/su-common.c

index bf4a47126177c9a748e7a99347a68531f78d88e0..1662d21bbac3cf82fa7432e85b715d6cd303e5a5 100644 (file)
@@ -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)