Date: Tue, 06 Sep 2005 02:29:53 +0900 From: Hajimu UMEMOTO <ume@FreeBSD.org> To: Randy Bush <randy@psg.com> Cc: arch@FreeBSD.org, Robert Watson <rwatson@FreeBSD.org> Subject: Re: [CFR] reflect resolv.conf update to running application Message-ID: <ygeslwjbey6.wl%ume@mahoroba.org> In-Reply-To: <17160.29026.1724.73259@roam.psg.com> References: <ygefyt4yiaz.wl%ume@mahoroba.org> <20050821003536.P14178@fledge.watson.org> <17160.29026.1724.73259@roam.psg.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, >>>>> On Sun, 21 Aug 2005 12:19:46 +0000 >>>>> Randy Bush <randy@psg.com> said: > (2) By reading the configuration file more frequently and more quickly > after a change, we increase the chances of a race condition in which > the resolve reads a partially written resolv.conf file during an > update. Does this happen in practice? I've always been very leery of > re-reading configuration files automatically based on a time-stamp, as > updates to files are not atomic at all. randy> hmmmmm randy> dunno about others' use patterns, but in my world, resolv.conf only randy> changes when my mobile platform moves layer three binding (i.e. not randy> an an 802.11 access point move). so the frequency is low, and it randy> is usually not issuing dns queries as i move. but when i get to randy> the new binding, i am annoyed if i have to whack the resolver. Yes, I believe resolv.conf is not updated so often. Once, it is updated, we cannot do DNS lookup correctly without restarting an application. My patch solves this situation. Even when re-reading resolv.conf fails unfortunately, you will be able to recover easily by touching resolv.conf instead of restarting your application. Sincerely, -- Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan ume@mahoroba.org ume@{,jp.}FreeBSD.org http://www.imasy.org/~ume/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ygeslwjbey6.wl%ume>