mirror of
https://github.com/curl/curl.git
synced 2026-04-14 21:51:41 +03:00
select: do not return fatal error on EINTR from poll()
The same was done for select() in5912da25but poll() was missed. Bug: https://bugs.archlinux.org/task/75201 Reported-by: Alexandre Bury (gyscos at archlinux) Ref: https://github.com/curl/curl/issues/8921 Ref: https://github.com/curl/curl/pull/8961 Ref:5912da25 (r77584294)Closes https://github.com/curl/curl/pull/9091
This commit is contained in:
parent
e584b1c044
commit
52e822173a
1 changed files with 5 additions and 1 deletions
|
|
@ -310,8 +310,12 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms)
|
|||
else
|
||||
pending_ms = 0;
|
||||
r = poll(ufds, nfds, pending_ms);
|
||||
if(r <= 0)
|
||||
if(r <= 0) {
|
||||
if((r == -1) && (SOCKERRNO == EINTR))
|
||||
/* make EINTR from select or poll not a "lethal" error */
|
||||
r = 0;
|
||||
return r;
|
||||
}
|
||||
|
||||
for(i = 0; i < nfds; i++) {
|
||||
if(ufds[i].fd == CURL_SOCKET_BAD)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue