]> git.ipfire.org Git - thirdparty/util-linux.git/commit
su: (pty) improve SIGSTOP/SIGCONT semantic
authorKarel Zak <kzak@redhat.com>
Thu, 7 Sep 2017 12:19:20 +0000 (14:19 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 18 Sep 2017 09:49:11 +0000 (11:49 +0200)
commite9fde3e9004d1661b5229a476cf0cacfb8d0ef4f
treebdc015649838b25e4596cb4756c7b7721c589b0c
parent13ee2f4d78fd6866cc82b6e237f178752fe60371
su: (pty) improve SIGSTOP/SIGCONT semantic

We want to use waitpid() only when child is terminated or stopped to
pick up child status, otherwise PTY proxy has to be active. This is
difference between "su" and "su --pty". For "su" we keep parent all
time in waitpid().

It would be possible to use separate code based on signalfd_siginfo,
but it seems better to keep all this stuff on one place -- it  means
wait_for_child().

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