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: Constantine Sapuntzakis <csapuntz_at_gmail.com>
Date: Sat, 7 Nov 2009 16:16:11 -0800

> 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.

That's assuming the client program is threaded. Perhaps on Unix,
people mostly use curl in a single thread per process (curl
executable, Apache).

A gethostbyname_r() that's thread unsafe would be a horrible hack. I
would hope such setups are exceedingly rare.

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

In many of the BSDs getaddrinfo() was not thread safe.

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

These mail archives are generated by hypermail.

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

File upload with ASP.NET