summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-12-15 01:01:00 +0000
committerbde <bde@FreeBSD.org>1995-12-15 01:01:00 +0000
commitaa3aedfa8c7d5078f4d2031059f73592d350d626 (patch)
tree220376c1424a1b42046354d40bea4137f39557d9 /sys/kern/tty.c
parent78ea2a381b4a1829338088dc12e054d05bd32b59 (diff)
downloadFreeBSD-src-aa3aedfa8c7d5078f4d2031059f73592d350d626.zip
FreeBSD-src-aa3aedfa8c7d5078f4d2031059f73592d350d626.tar.gz
Disabled the sleep in ttyflush(). It can't work in general because
ttyflush() might be called from an interrupt handler. This fixes panics in IXOFF mode at the cost of more failures to send the START character to exit from IXOFF mode.
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r--sys/kern/tty.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index d54f5f7..6c1e8f4 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)tty.c 8.8 (Berkeley) 1/21/94
- * $Id: tty.c,v 1.74 1995/12/14 08:31:56 phk Exp $
+ * $Id: tty.c,v 1.75 1995/12/14 22:32:39 bde Exp $
*/
/*-
@@ -1166,7 +1166,20 @@ again:
CLR(tp->t_state, TS_LOCAL);
ttwakeup(tp);
if (ISSET(tp->t_state, TS_TBLOCK)) {
+ if (rw & FWRITE)
+ FLUSHQ(&tp->t_outq);
ttyunblock(tp);
+
+ /*
+ * Don't let leave any state that might clobber the
+ * next line discipline (although we should do more
+ * to send the START char). Not clearing the state
+ * may have caused the "putc to a clist with no
+ * reserved cblocks" panic/printf.
+ */
+ CLR(tp->t_state, TS_TBLOCK);
+
+#if 0 /* forget it, sleeping isn't always safe and we don't know when it is */
if (ISSET(tp->t_iflag, IXOFF)) {
/*
* XXX wait a bit in the hope that the stop
@@ -1186,6 +1199,7 @@ again:
CLR(tp->t_state, TS_TBLOCK);
goto again;
}
+#endif
}
}
if (rw & FWRITE) {
OpenPOWER on IntegriCloud