summaryrefslogtreecommitdiffstats
path: root/osdep/terminal-unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/terminal-unix.c')
-rw-r--r--osdep/terminal-unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/osdep/terminal-unix.c b/osdep/terminal-unix.c
index f8130c4960..057c6e8cae 100644
--- a/osdep/terminal-unix.c
+++ b/osdep/terminal-unix.c
@@ -420,7 +420,7 @@ static void *terminal_thread(void *ptr)
break;
if (fds[1].revents) {
int retval = read(tty_in, &buf.b[buf.len], BUF_LEN - buf.len);
- if (!retval || (retval == -1 && (errno == EBADF || errno == EINVAL)))
+ if (!retval || (retval == -1 && errno != EINTR && errno != EAGAIN))
break; // EOF/closed
if (retval > 0) {
buf.len += retval;