Subject: Re: Are res_send and res_query thread-safe?
To: Emmanuel Dreyfus <firstname.lastname@example.org>
From: Love <email@example.com>
Date: 04/03/2004 22:09:20
firstname.lastname@example.org (Emmanuel Dreyfus) writes:
> 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.
That is the only solution, application shouldn't assume res_search is
treadsafe/re-enterat. But see comment below.
> 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?
You program/library have to use res_ninit/res_nsearch that is part of the
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)
-----END PGP SIGNATURE-----