cURL / Mailing Lists / curl-library / Single Mail


RE: curl_multi_fdset always returns -1 for maxfd

From: Vishakha Vaidya <>
Date: Wed, 12 Nov 2014 12:46:32 +0000

> -----Original Message-----
> From: curl-library [] On Behalf Of Daniel Stenberg
> Sent: Wednesday, November 12, 2014 6:04 PM
> To: libcurl development
> Subject: RE: curl_multi_fdset always returns -1 for maxfd
> On Wed, 12 Nov 2014, Vishakha Vaidya wrote:

> > Like I said the problem is windows only, on my mac it works fine.

> Yes, but windows builds use the threaded resolver by default and I suspect your mac build may not, so I tried the threaded one on Linux in an effort to repeat the problem. And it wouldn't repeat.
> The libcurl code isn't that very different for Windows vs the other platforms so I don't see what makes this fails only on Windows.
> What if you just avoid the select() when maxfd is negative and instead just sleep for 100ms or something?
> --
> /
> -------------------------------------------------------------------
> List admin:
> Etiquette:

If I avoid both curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); and select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout);
Just use curl_multi_perform(multi_handle, &still_running);
the code works, is that the right way to do it?


List admin:
Received on 2014-11-12