cURL
Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Archives

Re: [PATCH, RFC] Make hostthre.c work on POSIX

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 7 Nov 2009 23:06:06 +0100 (CET)

On Sat, 7 Nov 2009, Joshua Kwan wrote:

> This patch (should be applied on top of threading-v3.diff.gz) fixes the
> configure logic for evaluating whether we have an appropriate threadsafe
> resolver. The changes to hostthre.c have not yet been done yet.

I'm a bit curious on your talk and work on thread-safe resolvers.

If a getaddrinfo() or a gethostbyname_r() implementation anywhere is unsafe,
we already should have problems since libcurl is claimed to be thread-safe
already when using those functions and it has used them for many years without
problems.

Can anyone mention a getaddrinfo() or a gethostbyname_r() implementation that
isn't thread-safe?

The only systems that are hard to detect - to my recollection of this - are
the ones that provide a thread-safe gethostbyname() since it isn't that easy
to make a distinction, But in libcurl we prefer gethostbyname_r() anyway and
beyond that we rely on specific knowledge about for example that Window's name
resolver is thread-safe still.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2009-11-07

These mail archives are generated by hypermail.

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET