Subject: Re: re-reading /etc/resolv.conf on change
To: Jason Thorpe <thorpej@wasabisystems.com>
From: Greg A. Woods <woods@weird.com>
List: tech-userlevel
Date: 01/06/2004 17:45:03
[ On Tuesday, January 6, 2004 at 14:28:36 (-0800), Jason Thorpe wrote: ]
> Subject: Re: re-reading /etc/resolv.conf on change
>
> On Jan 6, 2004, at 1:58 PM, Luke Mewburn wrote:
> > 
> > I'm leaning towards the dns backend reloading resolv.conf as
> > necessary.
> 
> You still have to deal with detecting if the resolver configuration 
> changed, and so you have to expose those internal details to the 
> caller.

You're being way to strict in your vain attempt to compartmentalize
these things.  This is unix and this is C and this is a rather ancient
API that does have warts and there's really nothing you can do about it.
Artificially pretending things are more layered than they are is only
making it more difficult to deal with sanely.

Think of it the other way around:  _PATH_RESCONF is defined by the
system in the compile-time environment, not by the resolver(3)
routines.  I.e. there's nothing "internal" being exposed at all.

If/when there were a res_getconfname() API then it would be used instead
of _PATH_RESCONF, but still there'd be nothing internal being exposed.

-- 
						Greg A. Woods

+1 416 218-0098                  VE3TCP            RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>          Secrets of the Weird <woods@weird.com>