Date: Sun, 21 Aug 2005 19:17:06 +0200 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Alexander Leidinger <Alexander@Leidinger.net> Cc: arch@freebsd.org, Robert Watson <rwatson@freebsd.org> Subject: Re: [CFR] reflect resolv.conf update to running application Message-ID: <58449.1124644626@phk.freebsd.dk> In-Reply-To: Your message of "Sun, 21 Aug 2005 11:54:54 %2B0200." <20050821115454.55441a64@Magellan.Leidinger.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <20050821115454.55441a64@Magellan.Leidinger.net>, Alexander Leidinger writes: >On Sun, 21 Aug 2005 00:37:56 +0100 (BST) >Robert Watson <rwatson@freebsd.org> wrote: > >> (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. > >Can kqueue be used instead of polling? Programs writing resolv.conf should just this the right way: 1. Write new contents to temorary file. 2. Rename temporary file to resolv.conf. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?58449.1124644626>