Re: [CFR] reflect resolv.conf update to running application

From: Poul-Henning Kamp (phk_at_phk.freebsd.dk)
Date: 08/21/05

  • Next message: Alexey Dokuchaev: "fdesc allocation optimization"
    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"
    

  • Next message: Alexey Dokuchaev: "fdesc allocation optimization"

    Relevant Pages

    • Re: [SLE] Synaptic & failure
      ... > problem most likely it has to do with the kernel. ... 20:00:17 lajka2 xinetd: Reading included configuration ... xinetd: Reading included configuration file: ...
      (SuSE)
    • Re: Money For New Players
      ... > Halls....I've never heard of him but it looks like he may choose Reading. ... Well if there was any real sign that we may make the play ... stay here then it'd improve our chances to sign other young talented players ...
      (uk.sport.football.clubs.southampton)
    • Re: Passing the connection string from a web form to a business lo
      ... > I'm reading a value from App.config ... Are you talking about a Windows Forms app.config? ... Web applications use web.config by default for the configuration file. ... > Should I ignore the warring messages for "string sConnString = ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: To Russ G. & GCA
      ... Wash your hands after reading the posts. ... chances. ... >>You think it's the return of Keiser? ...
      (rec.gambling.poker)
    • Re: [kubuntu]leafnode =?ISO-8859-15?Q?l=E4sst_mich_nicht_r?= =?ISO-8859-15?Q?an?=
      ... Mar 6 11:40:58 gardenix xinetdÄ8231Ü: Reading included configuration file: /et ... Lässt sich damit was anfangen, allerdings finde ich im /etc Verzeichnis nichts, wo der Port 119 belegt wird. ...
      (de.comp.os.unix.linux.misc)

  • Quantcast