aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-06-19 09:33:03 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-06-19 09:33:03 +0000
commite466063020851791803c29b6f4bc00308e44c199 (patch)
treeceabf081d09bb7c0c7048e6f3d643fa182ba0a6b
parentosc: set color: update both grids, but exclude scrollback (diff)
term: ptmx: don't abort on EAGAIN when trying to read from ptxm
-rw-r--r--terminal.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/terminal.c b/terminal.c
index 74e46b7b..cbd9d51b 100644
--- a/terminal.c
+++ b/terminal.c
@@ -160,6 +160,9 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
count = read(term->ptmx, buf, sizeof(buf));
if (count < 0) {
+ if (errno == EAGAIN)
+ return true;
+
LOG_ERRNO("failed to read from pseudo terminal");
return false;
}