Re: Bogus "temporary" gethostbyaddr_r() in libc for 6 years

From: Terry Lambert <tlambert2_at_mindspring.com>
Date: Sun, 15 Jun 2003 19:45:10 -0700
Kris Kennaway wrote:
> There's a bogus implementation of gethostbyaddr_r() in
> lib/libc/net/gethostnamadr.c that was committed 6 years and nine
> months ago:
[...]
> What's the deal here? Despite the fact that this is not prototyped in
> a header, some ports are detecting this, and -- one assumes -- not
> behaving correctly since this implementation isn't thread-safe.

It should be removed.

It's really hard to write a multithreaded version of this function,
since it's essentially a request/response protocol.  The most correct
implementation would use a seperate worker thread and queue requests
to it.

-- Terry
Received on Sun Jun 15 2003 - 17:46:19 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:12 UTC