summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--term/users.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/term/users.c b/term/users.c
index a4e110b4..4ec2b810 100644
--- a/term/users.c
+++ b/term/users.c
@@ -678,7 +678,7 @@ trivfs_S_io_read (struct trivfs_protid *cred,
while (!qsize (inputq))
{
- if ((termflags & NO_CARRIER) && !(termstate.c_cflag & CLOCAL))
+ if ((termflags & NO_CARRIER) && !(termstate.c_cflag & CLOCAL) || !amount)
{
/* Return EOF, Posix.1 7.1.1.10. */
mutex_unlock (&global_lock);