> 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

Reply via email to