cURL / Mailing Lists / curl-library / Single Mail


Re: POSIX threaded DNS resolver - first experiences

From: Kamil Dudka <>
Date: Thu, 22 Apr 2010 20:20:33 +0200

On Thursday 22 of April 2010 19:29:20 Constantine Sapuntzakis wrote:
> The problem is with the test.

I bet you're right. I am a bit new to the multi interface. I hope that
libcurl based applications do not have the same flaw as test536 then :-)

> test536 doesn't handle maxfd == -1, which is a valid response from
> curl_multi_fdset when using the threaded resolver.
> I did a quick test on Mac OS X and changed the code to do the following:
> if (maxfd < 0) {
> sleep(1);
> continue;
> }

What about the attached patch?

> Unfortunately, this code won't compile on Windows (no sleep call).

Now it should compile fine on both systems and it seems like the fix is not
needed on Windows because of the following quirk:

> BTW, ares has better abort semantics than the threaded resolver.
> curl_*_cleanup will hang in the threaded DNS resolver until the
> resolver thread exits.

Good point. I didn't test it so far.


List admin:

Received on 2010-04-22