cangen: Do not treat -EINTR as error
parent
c142ca63c9
commit
3342eb42e7
5
cangen.c
5
cangen.c
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue