Subject: Re: re-reading /etc/resolv.conf on change
To: Perry E. Metzger <>
From: Andrew Brown <>
List: tech-userlevel
Date: 12/31/2003 17:21:54
>> i think that for whatever you can decide to watch, i can invent a
>> scheme that will "accidentally" bypass it.  we either need to decide
>> what the basic requirements are, or decide that doing:
>> 	fd = open("/etc/resolv.conf", O_RDONLY);
>> 	fstat(fd, &st);
>> 	<compare new st_dev/st_ino/st_size/st_mtime/st_ctime with
>> 	recorded st_dev/st_ino/st_size/st_mtime/st_ctime>
>> or something like that.  and then smack a sticker on it saying that we
>> done our best.
>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
>Then, if you alter resolv.conf, run a program announcing "I've altered
>resolv.conf" to the world and all will be well! :)

i have a better idea.  let's make *ALL* programs use only *ONE* local
program for name resolution.  that one program can then be the only
thing that actually reads resolv.conf, and when it changes, you only
need to make one program reread resolv.conf.

i suppose we could even call it lwresd, but i think george is a better
name.  or maybe bob.

bob's your uncle.

hmm...what about mike?

|-----< "CODE WARRIOR" >-----|             * "ah!  i see you have the internet (Andrew Brown)                that goes *ping*!"       * "information is power -- share the wealth."