cvs commit: src/include netdb.h resolv.h src/lib/libc/include reentrant.h src/lib/libc/net getaddrinfo.3 getaddrinfo.c gethostbydns.c gethostbyname.3 gethostbynis.c getipnodebyname.3 herror.c name6.c res_init.c res_send.c res_send_private.h ...

Brian F. Feldman green at FreeBSD.ORG
Wed Feb 25 14:16:08 PST 2004


Andrey Chernov <ache at nagual.pp.ru> wrote:
> On Wed, Feb 25, 2004 at 01:03:46PM -0800, Brian Feldman wrote:
> >   Make the resolver(3) and many associated interfaces much more reentrant.
> >   The getaddrinfo(3), getipnodebyname(3) and resolver(3) can coincide now
> >   with what should be totally reentrant, and h_errno values will now
> >   be preserved correctly, but this does not affect interfaces such as
> >   gethostbyname(3) which are still mostly non-reentrant.
> 
> Is there any chances to implement gethostbyname_r(3) (like in Solaris)? It 
> will be very useful for milters, they often want it.

It should be quite straightforward, but would touch a lot of the files in 
libc/net/, because there is no locking whatsoever in things related to 
gethostbyname(3).  I would actually suggest the possibility of implementing 
gethostbyname_r(3) as a wrapper to getaddrinfo(3).

-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green at FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\




More information about the cvs-src mailing list