Subject: Re: gethostbyname_r() ?
To: None <tech-net@netbsd.org>
From: Christos Zoulas <christos@astron.com>
List: tech-net
Date: 07/17/2006 17:38:00
In article <20060717172249.GF17998@apb-laptoy.apb.alt.za>,
Alan Barrett <apb@cequrux.com> wrote:
>On Mon, 17 Jul 2006, Christos Zoulas wrote:
>> These days one is supposed to be using getaddrinfo/getnameinfo.
>
>... which is still blocking, even if it is thread safe, so Tor would
>still need to use helper threads or processes to ensure that the main
>event loop didn't block.
>
>Tor actually tries to use getaddrinfo() if it is available, in
>preference to gethostbyname_r() or gethostbyname(). I didn't notice
>that when I wrote my previous message. If we have a working thread-safe
>getaddrinfo(), then pkgsrc could just patch Tor's configure script to
>disable the part that decides not to use threads on NetBSD.
Well last time I checked /usr/src/regress/lib/libpthread/resolv was working
fine.
christos