From owner-freebsd-arch@FreeBSD.ORG Mon Sep 5 17:30:00 2005 Return-Path: X-Original-To: arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EAAFD16A41F; Mon, 5 Sep 2005 17:30:00 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from ameno.mahoroba.org (gw4.mahoroba.org [218.45.22.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 204DA43D46; Mon, 5 Sep 2005 17:29:59 +0000 (GMT) (envelope-from ume@mahoroba.org) Received: from kasuga.mahoroba.org (IDENT:OF+RpzD3+GBUapdF4PBYbZJDRJaWi/1S9Kw0Ss/N5AweAaV0JwiujA6W7fya/fEV@kasuga.mahoroba.org [IPv6:3ffe:501:185b:8010:20b:97ff:fe2e:b521]) (user=ume mech=CRAM-MD5 bits=0) by ameno.mahoroba.org (8.13.4/8.13.4) with ESMTP/inet6 id j85HTrjb085827 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 6 Sep 2005 02:29:54 +0900 (JST) (envelope-from ume@mahoroba.org) Date: Tue, 06 Sep 2005 02:29:53 +0900 Message-ID: From: Hajimu UMEMOTO To: Randy Bush In-Reply-To: <17160.29026.1724.73259@roam.psg.com> References: <20050821003536.P14178@fledge.watson.org> <17160.29026.1724.73259@roam.psg.com> User-Agent: xcite1.38> Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 Emacs/22.0.50 (i386-unknown-freebsd6.0) MULE/5.0 (SAKAKI) X-Operating-System: FreeBSD 6.0-BETA4 X-PGP-Key: http://www.imasy.or.jp/~ume/publickey.asc X-PGP-Fingerprint: 1F00 0B9E 2164 70FC 6DC5 BF5F 04E9 F086 BF90 71FE Organization: Internet Mutual Aid Society, YOKOHAMA MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0 (ameno.mahoroba.org [IPv6:3ffe:501:185b:8010::1]); Tue, 06 Sep 2005 02:29:54 +0900 (JST) X-Virus-Scanned: by amavisd-new X-Virus-Status: Clean X-Spam-Status: No, score=-5.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on ameno.mahoroba.org Cc: arch@FreeBSD.org, Robert Watson Subject: Re: [CFR] reflect resolv.conf update to running application X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Sep 2005 17:30:01 -0000 Hi, >>>>> On Sun, 21 Aug 2005 12:19:46 +0000 >>>>> Randy Bush 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/