Subject: Re: Are res_send and res_query thread-safe?
To: Emmanuel Dreyfus <manu@netbsd.org>
From: Love <lha@stacken.kth.se>
List: tech-userlevel
Date: 04/03/2004 23:11:22
--=-=-=


manu@netbsd.org (Emmanuel Dreyfus) writes:

> Love <lha@stacken.kth.se> wrote:
>
>> > 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
>> bind8/9 api.
>
> I've found that BIND-8.2 is "nearly thread-safe", with older API as
> stubs using newer thread-safe API
> http://ops.ietf.org/lists/namedroppers/namedroppers.199x/msg03798.html
>
> Doesn't that means that everything will be alright once we link with
> BIND 8 resolver? Why res_ninit/res_nsearch would be required? 

I assume the annoucement is about the res_n functions.

res_n function are required unless you are prepend to do either of one of
global-locking res_ or using pthread_setspecific. Neither is really
appealing.

Love


--=-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iQEVAwUAQG8oe3W+NPVfDpmCAQJM6QgAp/TJdZvzPXRyKkbtW97Au1bAERA4EYvt
rtlAOkBMpq29kp4TxdBlI/tQ8p32g7bWAJEkVuf9Nbyec5GTfPYv5HiNL10RLQAi
DZyDDG9ca+h5AYzfrNgQiJP04+7ApsdYX/jCtwx8lybqZDUKL8sT1LXDd/o+U4bk
kNHqGmIY+BR9st4FkHhFLmKgqP1ZAjv3PLqz/53i21EAloB28ixvxYzWE2FCNENF
UBdRkReNZgDBOKAoK4oHko88KxIvZp6Rk+jLKGWIjEX8rPphoDZR2ay5UFqijc7U
+N99xaVUK7MAnZHgjBJGeWmhYCJV/kaqVknwZLnMmyyH2bYcB4L+eg==
=oW+d
-----END PGP SIGNATURE-----
--=-=-=--