diff options
| author | Oleh Hushchenkov <o.hushchenkov@gmail.com> | 2021-04-18 10:56:56 +0000 |
|---|---|---|
| committer | Oleh Hushchenkov <o.hushchenkov@gmail.com> | 2021-04-18 10:56:56 +0000 |
| commit | dfc517f6715ff239ac478a91ff017d526fdbcb5c (patch) | |
| tree | 291711dc80f4fa461a4208145a9a24ee6ab4fd71 /terminal.c | |
| parent | term: 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.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); |
