cangen: Do not treat -EINTR as error

pull/336/head
Stefan Herbrechtsmeier 2022-01-27 15:50:20 +01:00
parent c142ca63c9
commit 3342eb42e7
1 changed files with 4 additions and 1 deletions

View File

@ -503,8 +503,11 @@ resend:
return 1; return 1;
} }
if (polltimeout) { if (polltimeout) {
int ret;
/* wait for the write socket (with timeout) */ /* wait for the write socket (with timeout) */
if (poll(&fds, 1, polltimeout) <= 0) { ret = poll(&fds, 1, polltimeout);
if (ret == 0 || (ret == -1 && errno != -EINTR)) {
perror("poll"); perror("poll");
return 1; return 1;
} }