attempt to block, and hence return EAGAIN/EWOULDBLOCK, in spite of
the port having been reported readable by select(2). Don't treat
those errors as fatal.
git-svn-id: svn://svn.tartarus.org/sgt/putty@9020
cda61777-01e9-0310-a592-
d414129be87e
*/
finished = TRUE;
} else if (ret < 0) {
*/
finished = TRUE;
} else if (ret < 0) {
+#ifdef EAGAIN
+ if (errno == EAGAIN)
+ return 1; /* spurious */
+#endif
+#ifdef EWOULDBLOCK
+ if (errno == EWOULDBLOCK)
+ return 1; /* spurious */
+#endif
perror("read serial port");
exit(1);
} else if (ret > 0) {
perror("read serial port");
exit(1);
} else if (ret > 0) {