If Curl_poll() returns immediately the function will then return CURLM_OK right away without performing any waiting. This will lead curl_multi_poll()/curl_multi_wait() to return immediately as well. Effectively this will lead to a busyloop as there is no status returned that would lead to terminating a loop of a typical curl_multi_perform() + curl_multi_poll() app, at least if the app doesn't bail out once the connections are completed (still_running == 0 doesn't lead to loop termination).
I did this
Had condition where poll() (or select() if using poll() emulation) return a permanent error without waiting.
I expected the following
curl_multi_poll() / curl_multi_wait() to return an error if Curl_poll() fails.
The question is what error to return though as none of the CURLM_ errors seem to fit the bill.
This is a generic issue, but it is likely more likely to get triggered on specific platforms.
The text was updated successfully, but these errors were encountered:
EFAULT fds points outside the process's accessible address space. The array given as
argument was not contained in the calling program's address space.
EINTR A signal occurred before any requested event; see signal(7).
EINVAL The nfds value exceeds the RLIMIT_NOFILE value.
EINVAL (ppoll()) The timeout value expressed in *ip is invalid (negative).
ENOMEM Unable to allocate memory for kernel data structures.
Indeed, EINTR probably should not be considered fatal.