Ming Zhang wrote:
>
> Is there a MT-safe implementation of gethostbyname() in FreeBSD (3.4/4.0)?
>
> On Solaris there is gethostbyname_r(). Calling gethostbyname() with in
> two threads cause both threads to block.
>
> I know the "struct hostent" is static in gethostbyname(), however it seems
> like the socket that is used to get the DNS info is static too.
If you look at the current implementatino of the getXbyY functions, you'll
find they are jungles full of static data. I've been (slowly) writing the
_r function missing from FreeBSD, documenting the hidden ones I've found,
and generally fleshing this out, but I've left getXbyY to last because
they're fugly.
I'll start with gethostbyname_r because that is the most useful, but I
cannot promise when that might be.
--
"Where am I, and what am I doing in this handbasket?"
Wes Peters Softweyr LLC
[EMAIL PROTECTED] http://softweyr.com/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message