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:
parent
d9ae813ea1
commit
8ee58ba9e6
@ -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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user