Subject: Re: re-reading /etc/resolv.conf on change
To: NetBSD Userlevel Technical Discussion List <tech-userlevel@NetBSD.ORG>
From: Greg A. Woods <>
List: tech-userlevel
Date: 01/01/2004 14:27:07
[ On Wednesday, December 31, 2003 at 17:19:18 (-0500), Perry E. Metzger wrote: ]
> Subject: Re: re-reading /etc/resolv.conf on change
> Another possibility -- maybe we are looking at this wrong? There are a
> variety of conditions we might want to inform programs of ("you've
> just been awakened after a deep sleep", "the network addresses have
> all changed", "your resolv.conf is different"), and perhaps we should
> come up with a more general mechanism for telling programs about such
> things?

We already have such mechanisms, although they are a bit, well OK a lot
more generic than you outline above:  SIGCONT and SIGHUP.  :-)

However in my experience they've been quite sufficient for these
purposes.  I think any finer-grained mechanism inbetween SIGHUP and
kqueue events would be simply too specialized to be worthwhile.

> Then, if you alter resolv.conf, run a program announcing "I've altered
> resolv.conf" to the world and all will be well! :)

Adding support for a "reload" parameter to /etc/rc would be trivial.

(and doing so wouldn't even assume SIGHUP support -- our rc.d scripts
are already flexible enough to support any mechanism for communicating
with a running daemon)

						Greg A. Woods

+1 416 218-0098                  VE3TCP            RoboHack <>
Planix, Inc. <>          Secrets of the Weird <>