aboutsummaryrefslogtreecommitdiff
path: root/termkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'termkey.c')
-rw-r--r--termkey.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/termkey.c b/termkey.c
index c95dbf4..59b1859 100644
--- a/termkey.c
+++ b/termkey.c
@@ -873,7 +873,7 @@ TermKeyResult termkey_advisereadable(TermKey *tk)
unsigned char buffer[64]; // Smaller than the default size
ssize_t len = read(tk->fd, buffer, sizeof buffer);
- if(len == -1 && errno == EAGAIN)
+ if(len == -1 && (errno == EAGAIN || errno == EINTR))
return TERMKEY_RES_NONE;
else if(len < 1) {
tk->is_closed = 1;