From e466063020851791803c29b6f4bc00308e44c199 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 19 Jun 2020 11:33:03 +0200 Subject: [PATCH] term: ptmx: don't abort on EAGAIN when trying to read from ptxm --- terminal.c | 3 +++ 1 file changed, 3 insertions(+) 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; }