Date: Tue, 21 Oct 2008 14:18:45 +0000 (UTC) From: Andrew Thompson <thompsa@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r184127 - head/sys/kern Message-ID: <200810211418.m9LEIjVF001164@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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. */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810211418.m9LEIjVF001164>