Re: [CFR] reflect resolv.conf update to running application
From: Poul-Henning Kamp (phk_at_phk.freebsd.dk)
Date: 08/21/05
- Previous message: Randy Bush: "Re: [CFR] reflect resolv.conf update to running application"
- In reply to: Alexander Leidinger: "Re: [CFR] reflect resolv.conf update to running application"
- Next in thread: Brooks Davis: "Re: [CFR] reflect resolv.conf update to running application"
- Reply: Brooks Davis: "Re: [CFR] reflect resolv.conf update to running application"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: Alexander Leidinger <Alexander@Leidinger.net> Date: Sun, 21 Aug 2005 19:17:06 +0200
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. _______________________________________________ freebsd-arch@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arch To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Randy Bush: "Re: [CFR] reflect resolv.conf update to running application"
- In reply to: Alexander Leidinger: "Re: [CFR] reflect resolv.conf update to running application"
- Next in thread: Brooks Davis: "Re: [CFR] reflect resolv.conf update to running application"
- Reply: Brooks Davis: "Re: [CFR] reflect resolv.conf update to running application"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|