diff options
author | thompsa <thompsa@FreeBSD.org> | 2008-10-21 14:18:45 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2008-10-21 14:18:45 +0000 |
commit | 8ee58ba9e66f5d9293a780c100118b57f0cdfd22 (patch) | |
tree | 7ceae17e8dfadf4ace95d3683bc5c1a433be01e0 /sys/kern/tty.c | |
parent | d9ae813ea1e74131d4bd84b8bfa77da974d580eb (diff) | |
download | FreeBSD-src-8ee58ba9e66f5d9293a780c100118b57f0cdfd22.zip FreeBSD-src-8ee58ba9e66f5d9293a780c100118b57f0cdfd22.tar.gz |
If we have getc_inject hooked then the outq buffer is inaccessible to the
driver so skip the drain rather than waiting indefinitely.
Reviewed by: ed
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r-- | sys/kern/tty.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index ef9818b..6c2553a 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -119,6 +119,10 @@ tty_drain(struct tty *tp) { int error; + if (ttyhook_hashook(tp, getc_inject)) + /* buffer is inaccessable */ + return (0); + while (ttyoutq_bytesused(&tp->t_outq) > 0) { ttydevsw_outwakeup(tp); /* Could be handled synchronously. */ |