Subject: Re: gethostbyname & gethostbyaddr in libc thread-safe yet?
To: None <christos@zoulas.com, alicia@engine.ca, tech-net@NetBSD.org>
From: None <itojun@iijlab.net>
List: tech-net
Date: 05/26/2004 13:59:27
>> The manual page of getaddrinfo is out of date (it is thread-safe in
>> NetBSD-current). I would suggest to look into linking with the lwres_
>> library that comes with bind9. Other than that, you can use mutexes
>> to protect the current gethostbyfoo(), but that will make it really
>> slow. Another approach is to fork, which is worse.
>
>	no, getaddrinfo is not thread-safe yet in netbsd-current.
>
>	getadddrinfo: _yp_getaddrinfo, see variable __ypcurrent

	and getnameinfo() calls thread-unsafe libraries in gethnamaddr.c (again,
	YP part) so it is not thread-safe.

itojun