cURL / Mailing Lists / curl-library / Single Mail


Re: Select returns -1 on all the multi examples in win32

From: Ray Satiro <>
Date: Sat, 15 Nov 2014 16:39:05 -0500

On 11/15/2014 3:33 PM, Daniel Stenberg wrote:
> On Fri, 14 Nov 2014, Ray Satiro wrote:
>> I have attached a patch which fixes the multi examples for use on
>> Windows by sleeping 100ms whenever curl_multi_fdset() doesn't set any
>> file descriptors. I also added a check on its return value because
>> why not.
> Thanks a lot to both of you, pushed now!
> A little request for next time: please use "Reported-by:" in a single
> line (like I edited the commit message to do) to better allow our
> scripts to find and extract contributor names to include them for
> credits in RELEASE-NOTES and THANKS.

Ok. To state the obvious the timeout behavior is different depending on
platform now. In the case of platforms other than Windows if there are
no fds select() will still sleep whatever is in timeout, which could be
less than the recommended minimum value of 100ms depending on what is
returned by curl_multi_timeout(). I assume that will result in excess
looping. But I tried to produce that just now in Ubuntu 14 and couldn't
since curl_multi_fdset is always returning fds for me. Should the multi
examples be changed for the other platforms as well to sleep 100ms when
there are no fds ready?

List admin:
Received on 2014-11-15