cURL / Mailing Lists / curl-library / Single Mail


RE: curl_multi_fdset always returns -1 for maxfd

From: Daniel Stenberg <>
Date: Wed, 12 Nov 2014 14:13:11 +0100 (CET)

On Wed, 12 Nov 2014, Vishakha Vaidya wrote:

> 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?

No. You want curl_multi_fdset() to figure out what to wait for, but if there's
nothing to wait for you can/should just wait a short while instead of calling

Further desrcibed in the man page:

List admin:
Received on 2014-11-12