]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - unix/uxcons.c
Note the interaction of jump lists and -cleanup.
[PuTTY.git] / unix / uxcons.c
index b9fd67fe927423c7587be969ff545247218ff1fd..716f3fc533d653ccb0b6fa9751124d3df0a7d22f 100644 (file)
 #include <termios.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <sys/time.h>
+#ifndef HAVE_NO_SYS_SELECT_H
+#include <sys/select.h>
+#endif
 
 #include "putty.h"
 #include "storage.h"
@@ -97,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;