summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2014-11-21 02:47:19 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2014-11-21 02:48:33 +0100
commitfa108a1e6f15946aa72cd8edd09f3c08255b76fd (patch)
tree1b80fb4a69019905b3a9c5248e166ec4753029cb
parent6cc0c78b1f496cc9e680c0726b7561c93c3f1a7c (diff)
Let pty readers always read end of writer output
* term/ptyio.c (pty_io_read): Do not return EIO when there is no writer any more but some output remains in the pipe.
-rw-r--r--term/ptyio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/term/ptyio.c b/term/ptyio.c
index 211e70a8..6b015851 100644
--- a/term/ptyio.c
+++ b/term/ptyio.c
@@ -331,7 +331,7 @@ pty_io_read (struct trivfs_protid *cred,
}
}
- if (!(termflags & TTY_OPEN))
+ if (!(termflags & TTY_OPEN) && !qsize (outputq))
{
pthread_mutex_unlock (&global_lock);
return EIO;