summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorniklas <niklas@openbsd.org>1996-02-17 18:22:53 +0000
committerniklas <niklas@openbsd.org>1996-02-17 18:22:53 +0000
commit1d8920afbc93450c62bdd05967aa1a3667e83a99 (patch)
tree219623258d4f80da0e9c02f99fb8107f69aa85f5
parentMoved INCLUDE_DEFAULTS path define into openbsd.h. openbsd.h now has (diff)
downloadwireguard-openbsd-1d8920afbc93450c62bdd05967aa1a3667e83a99.tar.xz
wireguard-openbsd-1d8920afbc93450c62bdd05967aa1a3667e83a99.zip
From netbsd:
fix bug where child% suspend parent% bg parent% fg Fg would not work anymore, it would say Suspended (tty input).
-rw-r--r--bin/csh/func.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/csh/func.c b/bin/csh/func.c
index ba70e9753b2..78d4751b6c2 100644
--- a/bin/csh/func.c
+++ b/bin/csh/func.c
@@ -1,4 +1,4 @@
-/* $NetBSD: func.c,v 1.10 1995/03/21 18:35:42 mycroft Exp $ */
+/* $NetBSD: func.c,v 1.11 1996/02/09 02:28:29 christos Exp $ */
/*-
* Copyright (c) 1980, 1991, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)func.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: func.c,v 1.10 1995/03/21 18:35:42 mycroft Exp $";
+static char rcsid[] = "$NetBSD: func.c,v 1.11 1996/02/09 02:28:29 christos Exp $";
#endif
#endif /* not lint */
@@ -1400,11 +1400,13 @@ dosuspend(v, t)
(void) signal(SIGTSTP, old);
if (tpgrp != -1) {
+retry:
ctpgrp = tcgetpgrp(FSHTTY);
- while (ctpgrp != opgrp) {
+ if (ctpgrp != opgrp) {
old = signal(SIGTTIN, SIG_DFL);
(void) kill(0, SIGTTIN);
(void) signal(SIGTTIN, old);
+ goto retry;
}
(void) setpgid(0, shpgrp);
(void) tcsetpgrp(FSHTTY, shpgrp);