diff options
| author | Oleh Hushchenkov <o.hushchenkov@gmail.com> | 2021-04-18 10:56:56 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-04-18 18:09:01 +0000 |
| commit | 98db408e1a85dce809a9bde5caf11120b0710122 (patch) | |
| tree | 425bfa45fb667cba9cfff606020aa37a280c56b7 | |
| parent | term: attributes struct: use ‘bool’ instead of ‘uint32_t’ for 1-bit members (diff) | |
term: stop reading on eof
| -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); |
