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
This commit is contained in:
thompsa 2008-10-21 14:18:45 +00:00
parent d9ae813ea1
commit 8ee58ba9e6

View File

@ -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. */