summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2019-12-02 23:42:38 +0100
committerBoris Faure <billiob@gmail.com>2019-12-02 23:42:38 +0100
commit99d8436f5a3bbdddbfeaba59408874d84f04dfb3 (patch)
treee25490ac8715152ab906b4000bda22390cb910d9
parent1333e80866591f4507b5e038f47aaf4647030399 (diff)
termpty: retry read() on EINTR
-rw-r--r--src/bin/termpty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/termpty.c b/src/bin/termpty.c
index 879135f..61f78cb 100644
--- a/src/bin/termpty.c
+++ b/src/bin/termpty.c
@@ -268,7 +268,7 @@ _fd_read_do(Termpty *ty, Ecore_Fd_Handler *fd_handler, Eina_Bool false_on_empty)
268 } 268 }
269 errno = 0; 269 errno = 0;
270 len = read(ty->fd, rbuf, len); 270 len = read(ty->fd, rbuf, len);
271 if ((len < 0 && errno != EAGAIN) || 271 if ((len < 0 && !(errno == EAGAIN || errno == EINTR)) ||
272 (len == 0 && errno != 0)) 272 (len == 0 && errno != 0))
273 { 273 {
274 /* Do not print error if the child has exited */ 274 /* Do not print error if the child has exited */