billiob pushed a commit to branch master. http://git.enlightenment.org/apps/terminology.git/commit/?id=5770c51d861cb7ad4793380b82d7e94f6a5c55a9
commit 5770c51d861cb7ad4793380b82d7e94f6a5c55a9 Author: Boris Faure <bill...@gmail.com> Date: Mon Dec 5 23:39:29 2016 +0100 termpty: handle read() from tty pair when the other end has died, on some BSD In such a case, read() returns 0 and sets errno to ECHILD… --- src/bin/termpty.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bin/termpty.c b/src/bin/termpty.c index 476c1d0..dcdfdfc 100644 --- a/src/bin/termpty.c +++ b/src/bin/termpty.c @@ -184,8 +184,10 @@ _cb_fd_read(void *data, Ecore_Fd_Handler *fd_handler) rbuf++; len--; } + errno = 0; len = read(ty->fd, rbuf, len); - if (len < 0 && errno != EAGAIN) + if ((len < 0 && errno != EAGAIN) || + (len == 0 && errno != 0)) { /* Do not print error if the child has exited */ if (ty->pid != -1) --