cURL / Mailing Lists / curl-library / Single Mail


Re: Curl, threading and gethostbyname

From: Christian Mauduit <>
Date: Thu, 26 Aug 2010 23:55:12 +0200 (CEST)


On Thu, August 26, 2010 11:36 pm, Dan Fandrich wrote:
> On Thu, Aug 26, 2010 at 10:13:44PM +0200, Christian Mauduit wrote:
>> Still, bug continues to show :( So I'm asking myself if the problem
>> could
>> be that libCurl calls gethostbyname or such function in a separate
>> thread.
>> Does that make sense? Not sure, I lock all Curl calls with my mutex.
> Are you using the easy or multi interface? Recent versions of libcurl will
> spawn a thread to handle host lookups in some configurations. What is the
> output of 'curl --version' using your libcurl.

Here's the version I use:
$ curl --version
curl 7.19.7 (i386-redhat-linux-gnu) libcurl/7.19.7 NSS/ zlib/1.2.3
libidn/1.9 libssh2/1.0
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile SSL libz
$ cat /etc/redhat-release
Fedora release 11 (Leonidas)

AFAIK I use the "easy" interface.

> Rebuilding libcurl with
> c-ares support or --disable-threaded-resolver may help.
OK, I note that, thanks for the tip. I'll try and make a few tests with
latest curl and theses options.

Have nice day,


Christian Mauduit <> - ___ __/\__
Liquid War 6 -      / _")\~ \~/
"Les amis de la vérité sont ceux qui la cherchent et non _/ /   /_ o_\
ceux qui se vantent de l'avoir trouvée" - Condorcet     (__/      \/
List admin:
Received on 2010-08-26