Subject: Re: Are res_send and res_query thread-safe?
To: Love <lha@stacken.kth.se>
From: Emmanuel Dreyfus <manu@netbsd.org>
List: tech-userlevel
Date: 04/03/2004 17:53:39
Love <lha@stacken.kth.se> wrote:
> > I suspect a re-entrency problem. Are our resolver functions known to be
> > thread safe?
> They are not threadsafe since they are based on bind4 resolver library.
Right. So there are no way of performing two DNS lookups at the same
time from the same process?
One solution is to serialize the lookups using locks, but that is not a
very good option since a DNS lookup can take several seconds.
Do I get a fix by linking with BIND8 resolver? (or BIND9? Is BIND8
resolver thread safe?) Is it possible? Won't that clash at link time
with the resolver function available in libc?
--
Emmanuel Dreyfus
Il y a 10 sortes de personnes dans le monde: ceux qui comprennent
le binaire et ceux qui ne le comprennent pas.
manu@netbsd.org