Remove tcsetpgrp() stuff across suspend/continue because it cause upper level
tcsh killed on resume (fg). It is because tcsh is interactive itself and do its own things with terminal group.
This commit is contained in:
parent
56030358cb
commit
831ab44e67
@ -128,7 +128,7 @@ main(int argc, char *argv[])
|
||||
uid_t ruid;
|
||||
gid_t gid;
|
||||
int asme, ch, asthem, fastlogin, prio, i, setwhat, retcode,
|
||||
statusp, child_pid, child_pgrp, ret_pid;
|
||||
statusp, child_pid, ret_pid;
|
||||
char *username, *cleanenv, *class, shellbuf[MAXPATHLEN];
|
||||
const char *p, *user, *shell, *mytty, **nargv;
|
||||
|
||||
@ -329,9 +329,7 @@ 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);
|
||||
statusp = 1;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user