mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-20 14:15:31 +00:00
Ignore EAGAIN when doing tty io
This commit is contained in:
parent
3463931dad
commit
609d42e2bc
1 changed files with 1 additions and 0 deletions
|
|
@ -484,6 +484,7 @@ read_from_tty(int *fd, transfer_buf *t) {
|
|||
ssize_t n = safe_read(*fd, t->buf + t->sz, IO_BUZ_SZ - t->sz);
|
||||
if (n < 0) {
|
||||
if (errno == EPIPE || errno == EIO) { *fd = -1; return true; }
|
||||
if (errno == EAGAIN) return true;
|
||||
return false;
|
||||
}
|
||||
if (n == 0) *fd = -1; // hangup
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue