Fix su job control (recently introduced for PAM cleanup purposes) to not
kill login shell on either "suspend/fg" or "stop $$/fg" for tcsh. Since this bug occurse on -stable too, it is not kernel threads bug. Submitted by: David Xu <bsddiy@yahoo.com>
This commit is contained in:
parent
d8a0d0795b
commit
54c93e4f4d
@ -329,10 +329,13 @@ main(int argc, char *argv[])
|
||||
default:
|
||||
while ((ret_pid = waitpid(child_pid, &statusp, WUNTRACED)) != -1) {
|
||||
if (WIFSTOPPED(statusp)) {
|
||||
child_pgrp = tcgetpgrp(1);
|
||||
kill(getpid(), SIGSTOP);
|
||||
tcsetpgrp(1, child_pgrp);
|
||||
kill(child_pid, SIGCONT);
|
||||
child_pgrp = getpgid(child_pid);
|
||||
if (tcgetpgrp(1) == getpgrp())
|
||||
{
|
||||
tcsetpgrp(1, child_pgrp);
|
||||
kill(child_pid, SIGCONT);
|
||||
}
|
||||
statusp = 1;
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user