From fa108a1e6f15946aa72cd8edd09f3c08255b76fd Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 21 Nov 2014 02:47:19 +0100 Subject: 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. --- term/ptyio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'term/ptyio.c') 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; -- cgit v1.2.3