patch-2.4.22 linux-2.4.22/drivers/char/n_tty.c

Next file: linux-2.4.22/drivers/char/qtronixmap.c
Previous file: linux-2.4.22/drivers/char/misc.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/drivers/char/n_tty.c linux-2.4.22/drivers/char/n_tty.c
@@ -1238,7 +1238,8 @@
 		else
 			tty->minimum_to_wake = 1;
 	}
-	if (tty->driver.chars_in_buffer(tty) < WAKEUP_CHARS)
+	if (tty->driver.chars_in_buffer(tty) < WAKEUP_CHARS &&
+			tty->driver.write_room(tty) > 0)
 		mask |= POLLOUT | POLLWRNORM;
 	return mask;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)