Author: thompsa
Date: Tue Oct 21 14:18:45 2008
New Revision: 184127
URL: http://svn.freebsd.org/changeset/base/184127
Log:
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
Modified:
head/sys/kern/tty.c
Modified: head/sys/kern/tty.c
==============================================================================
--- head/sys/kern/tty.c Tue Oct 21 14:11:00 2008 (r184126)
+++ head/sys/kern/tty.c Tue Oct 21 14:18:45 2008 (r184127)
@@ -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. */
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"