mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-03 04:22:47 -05:00
Add some missing checks for EINTR after select(2).
I noticed today that Unix Plink responds to SIGWINCH by accidentally dying of EINTR having interrupted its main select loop, and when I checked, there turn out to be a couple of other select loops with the same bug.
This commit is contained in:
@ -1122,6 +1122,9 @@ int main(int argc, char **argv)
|
||||
ret = select(maxfd, &rset, &wset, &xset, NULL);
|
||||
}
|
||||
|
||||
if (ret < 0 && errno == EINTR)
|
||||
continue;
|
||||
|
||||
if (ret < 0) {
|
||||
perror("select");
|
||||
exit(1);
|
||||
|
Reference in New Issue
Block a user