aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorOleh Hushchenkov <o.hushchenkov@gmail.com>2021-04-18 10:56:56 +0000
committerOleh Hushchenkov <o.hushchenkov@gmail.com>2021-04-18 10:56:56 +0000
commitdfc517f6715ff239ac478a91ff017d526fdbcb5c (patch)
tree291711dc80f4fa461a4208145a9a24ee6ab4fd71 /terminal.c
parentterm: attributes struct: use ‘bool’ instead of ‘uint32_t’ for 1-bit members (diff)
term: stop reading on eof
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/terminal.c b/terminal.c
index e55230b4..ef33d975 100644
--- a/terminal.c
+++ b/terminal.c
@@ -247,6 +247,11 @@ fdm_ptmx(struct fdm *fdm, int fd, int events, void *data)
LOG_ERRNO("failed to read from pseudo terminal");
return false;
+ } else if (count == 0) {
+ /*
+ * Reached end-of-file
+ */
+ break;
}
vt_from_slave(term, buf, count);