Subject: Re: re-reading /etc/resolv.conf on change
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Jason Thorpe <thorpej@wasabisystems.com>
List: tech-userlevel
Date: 12/30/2003 13:07:17
--Apple-Mail-22-21957251
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII; format=flowed


On Dec 28, 2003, at 8:54 AM, Manuel Bouyer wrote:

> I found this really annoying on my laptop (I have to restart mozilla 
> every time
> I get online), so I came with the attached hack. Linux is probably 
> already
> rereading /etc/resolv.conf on change, because I didn't have this issue 
> when
> I used the linux netscape4 binary.

I fully support this change (there is an open PR on it, as well).  
FWIW, it's not annoying just on laptops.  It's also very annoying on 
server appliances.  Pretty much anything where you have long-running 
network-aware applications.

Comments on the patch itself:

	* I don't think kqueue is necessarily what you want to use.  I
	  think you want to use a combination of lstat() (to detect if
	  a symlink changes) and fstat() (to detect if the destination
	  of the symlink changes without the symlink itself changing).

	  Then unresolved is what to do if the file doesn't exist.

	* Library routines should not spit warnings/errors out to stderr
	  or stdout.  Please remove the warn(), err(), etc. calls that you
	  added.

         -- Jason R. Thorpe <thorpej@wasabisystems.com>


--Apple-Mail-22-21957251
content-type: application/pgp-signature; x-mac-type=70674453;
	name=PGP.sig
content-description: This is a digitally signed message part
content-disposition: inline; filename=PGP.sig
content-transfer-encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQE/8ekGOpVKkaBm8XkRAnrwAJ9PZz195/WytEWCMUp0cP/XCw1zDgCfRRns
9MX4iao4F4fLA4LReGpVhsI=
=1MX/
-----END PGP SIGNATURE-----

--Apple-Mail-22-21957251--