summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1996-02-17 18:22:54 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1996-02-17 18:22:54 +0000
commitfdca4f340f42ded00bd3cd6e22e3ebfc8c428d3d (patch)
treec90fb8a4f3e70d8ca4941cdcc1aa01672dd722d7 /bin
parente8c5ffdbe9b674d219b173f5e629772d0b3f69bf (diff)
From netbsd:
fix bug where child% suspend parent% bg parent% fg Fg would not work anymore, it would say Suspended (tty input).
Diffstat (limited to 'bin')
-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);