diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2011-05-24 18:17:15 +0100 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2011-05-24 18:17:15 +0100 |
commit | ac14d7b504e0e1d34c794df521c3f0d36d1898a3 (patch) | |
tree | cf17be3b99c3fbf53da75f5f186f10f465a68caf | |
parent | dad0e5019cce4f66dddf148eda4e8042d386f013 (diff) | |
download | termo-ac14d7b504e0e1d34c794df521c3f0d36d1898a3.tar.gz termo-ac14d7b504e0e1d34c794df521c3f0d36d1898a3.tar.xz termo-ac14d7b504e0e1d34c794df521c3f0d36d1898a3.zip |
Gracefully ignore read() yielding EINTR rather than bailing out
-rw-r--r-- | termkey.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |