cURL / Mailing Lists / curl-library / Single Mail


Re: POSIX threaded DNS resolver - first experiences

From: Constantine Sapuntzakis <>
Date: Thu, 22 Apr 2010 10:29:20 -0700

> I am about to experimentally switch libcurl in rawhide Fedora to use
> POSIX threaded DNS resolver.  I ugly hacked to enable this
> feature.  That's the first patch.  Then I had problem with permanently
> failing test536.  The failure seems to be caused by insufficiently

Thanks for working on this!

The problem is with the test.

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) {

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

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

List admin:
Received on 2010-04-22