[CFR] reflect resolv.conf update to running application

Hajimu UMEMOTO ume at FreeBSD.org
Mon Sep 5 10:30:01 PDT 2005


Hi,

>>>>> On Sun, 21 Aug 2005 12:19:46 +0000
>>>>> Randy Bush <randy at 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 at mahoroba.org  ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/


More information about the freebsd-arch mailing list