cURL / Mailing Lists / curl-library / Single Mail

curl-library

cURL cygwin and gethostbyname threading problems

From: Kord Campbell <kord_at_grub.org>
Date: Thu, 7 Feb 2002 14:12:00 -0600 (CST)

Our crawler uses the cURL libraries, and we've been working on
getting it running in cygwin for the past few weeks. We have
(apparently) run into a problem with the gethostbyname calls
that cURL uses.

When running the crawler with more than one thread, and after
a bit of time passes, the crawler will crash inside the cURL
routines, right where cURL accesses the gethostbyname funtion.

As we understand it, cygwin does not offer a reentrant version
of gethostbyname (gethostbyname_r coming to mind), and as such
may be susceptible to errors when used with multiple threads.
This also apparently breaks the reentrant capabilities of cURL
libraries themselves, when compiled and used under cygwin.

The nut of our question is whether anyone else can confirm or
deny any problems with the gethostbyname function in cygwin,
using cURL, and if confirmed, what was done to work around
this problem?

Thanks,

Kord

--------------------------------------------------------------
Kord Campbell Grub.Org Inc.
President 6051 N. Brookline #118
                                       Oklahoma City, OK 73112
kord_at_grub.org Voice: (405) 843-6336
http://www.grub.org Fax: (405) 848-5477
--------------------------------------------------------------
Received on 2002-02-07