]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - unix/uxcons.c
Add some missing checks for EINTR after select(2).
[PuTTY.git] / unix / uxcons.c
index 641c4b0f4aae914303c2fc44485d52c710cbb5c7..716f3fc533d653ccb0b6fa9751124d3df0a7d22f 100644 (file)
@@ -101,7 +101,9 @@ static int block_and_read(int fd, void *buf, size_t len)
         fd_set rfds;
         FD_ZERO(&rfds);
         FD_SET(fd, &rfds);
-        ret = select(fd+1, &rfds, NULL, NULL, NULL);
+        do {
+            ret = select(fd+1, &rfds, NULL, NULL, NULL);
+        } while (ret < 0 && errno == EINTR);
         assert(ret != 0);
         if (ret < 0)
             return ret;