Subject: Re: re-reading /etc/resolv.conf on change
To: None <>
From: Luke Mewburn <>
List: tech-userlevel
Date: 01/02/2004 00:16:03
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Dec 31, 2003 at 01:43:23PM -0500, John Hawkinson wrote:
  | If we're actually going to propose a filesystem access on every
  | nameservice check (i.e. fstat() or lstat()), I think that is not an
  | appropriate change if it is mandatory, and it should be controlled by
  | an option. I'd also like to have a better understanding of its
  | performance effects, especially on slow machines.

FWIW; the existing nsswitch code does this for every lookup
(stat's /etc/nsswitch.conf to check for changes) and has done
so since the code was imported over seven years ago, and
no-ones complained about it.  I don't think this is a big issue;
the kernel should be caching it.

If it turns out to be an issue, we can setup a kqueue EVFILT_VNODE
filter on the configuration files (nsswitch.conf, resolv.conf, ...)
and on /etc if the files don't exist...

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.3 (NetBSD)