cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl, threading and gethostbyname

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

Hi,

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:
----8<-------------------------------------------------
$ curl --version
curl 7.19.7 (i386-redhat-linux-gnu) libcurl/7.19.7 NSS/3.12.4.5 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)
----8<-------------------------------------------------

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.

-- 
Christian Mauduit <ufoot@ufoot.org> - http://deca.ufoot.org ___ __/\__
Liquid War 6 - http://www.gnu.org/software/liquidwar6      / _")\~ \~/
"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: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-08-26