diff options
author | ache <ache@FreeBSD.org> | 1995-02-13 02:03:57 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1995-02-13 02:03:57 +0000 |
commit | 1afa2e839193b2e77a207ba0fe4127a0b102c5ba (patch) | |
tree | 4583501c58bf6dba060c3e6f95461e6bf182c3cb /sys/kern/tty.c | |
parent | 5d842167c2007228922a6746b795bb046c4dd9a9 (diff) | |
download | FreeBSD-src-1afa2e839193b2e77a207ba0fe4127a0b102c5ba.zip FreeBSD-src-1afa2e839193b2e77a207ba0fe4127a0b102c5ba.tar.gz |
Replace previous fix with less agressive, just return EIO
if ttywait can't drain queue.
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r-- | sys/kern/tty.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index bc8c03f..9558822 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.21 1995/02/09 11:13:30 jkh Exp $ + * $Id: tty.c,v 1.22 1995/02/12 23:01:13 ache Exp $ */ #include <sys/param.h> @@ -1005,15 +1005,14 @@ ttywait(tp) break; } } - /* If some output still there, kill it */ - if (tp->t_outq.c_cc || ISSET(tp->t_state, TS_BUSY)) - ttyflush(tp, FWRITE); + if (!error && (tp->t_outq.c_cc || ISSET(tp->t_state, TS_BUSY))) + error = EIO; splx(s); return (error); } /* - * Flush after waiting. + * Flush if successfully wait. */ int ttywflush(tp) @@ -1021,8 +1020,8 @@ ttywflush(tp) { int error; - error = ttywait(tp); - ttyflush(tp, FREAD); + if ((error = ttywait(tp)) == 0) + ttyflush(tp, FREAD); return (error); } |