Bogus "temporary" gethostbyaddr_r() in libc for 6 years
Terry Lambert
tlambert2 at mindspring.com
Sun Jun 15 19:46:19 PDT 2003
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
More information about the freebsd-current
mailing list