Subject: Re: re-reading /etc/resolv.conf on change
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Perry E. Metzger <perry@piermont.com>
List: tech-userlevel
Date: 12/28/2003 15:51:38
Manuel Bouyer <bouyer@antioche.lip6.fr> writes:
> What I did is unconditionally call res_init() from other resolver functions.
> In res_init(), I use kqueue to monitor changes to /etc/resolv.conf
> (or to /etc/. if /etc/resolv.conf doens't exists). Every call to a resolver
> function will call res_init(), which will check the kevent queue.
> This adds a little overhead to the resolver functions (a function call,
> and a system call), but I think it's worth it.

One point -- I think that this is a great idea, but that we should
really be updating our resolver to the one from Bind 9
*before* we hack on it any further, or we will make it even harder to
import a new version.

(BTW, I think it would also be great if someone were to volunteer to
do that work soon...)

Also, does this code work correctly if resolv.conf is a symlink?


-- 
Perry E. Metzger		perry@piermont.com