diff options
author | ache <ache@FreeBSD.org> | 2002-08-07 05:44:50 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2002-08-07 05:44:50 +0000 |
commit | 376dbc34bab272fd9929de4c0997cc7e3aa9727e (patch) | |
tree | 5f298bacc3e85273d3a08ecc24e53f4829348c3b /usr.bin | |
parent | 836a5bf4a522daabe73244fb92e59f2b4818db6d (diff) | |
download | FreeBSD-src-376dbc34bab272fd9929de4c0997cc7e3aa9727e.zip FreeBSD-src-376dbc34bab272fd9929de4c0997cc7e3aa9727e.tar.gz |
Back out workaround of fixing "suspend/fg" by price of breaking "stop $$/fg".
This is real kernel bug (threads) and don't attempt to mask it by
workarounds to increase chances to fix it in the kernel.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/su/su.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/su/su.c b/usr.bin/su/su.c index 5e98031..6348099 100644 --- a/usr.bin/su/su.c +++ b/usr.bin/su/su.c @@ -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, ret_pid; + statusp, child_pid, child_pgrp, ret_pid; char *username, *cleanenv, *class, shellbuf[MAXPATHLEN]; const char *p, *user, *shell, *mytty, **nargv; @@ -329,7 +329,9 @@ 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; |