From owner-freebsd-arch@FreeBSD.ORG Tue Aug 23 15:26:23 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 A3E0516A41F for ; Tue, 23 Aug 2005 15:26:23 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3525A43D48 for ; Tue, 23 Aug 2005 15:26:23 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j7NFQKkS071113; Tue, 23 Aug 2005 10:26:20 -0500 (CDT) (envelope-from dan) Date: Tue, 23 Aug 2005 10:26:20 -0500 From: Dan Nelson To: Peter Jeremy Message-ID: <20050823152619.GC44859@dan.emsphone.com> References: <200508221318.46908.mreimer@vpop.net> <20050823074743.GC37107@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050823074743.GC37107@cirb503493.alcatel.com.au> X-OS: FreeBSD 5.4-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.9i Cc: arch@freebsd.org, Matthew Reimer 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: Tue, 23 Aug 2005 15:26:23 -0000 In the last episode (Aug 23), Peter Jeremy said: > On Mon, 2005-Aug-22 13:18:46 -0700, Matthew Reimer wrote: > >How about just stat'ing resolv.conf if more than X seconds has > >passed since the last stat, rather than for every lookup? > > That reduces the number of stat() calls but doesn't resolve the > possibility of reading a half-written resolv.conf. Easy enough to only reread the file if stat tells you it's more than 2 seconds old. -- Dan Nelson dnelson@allantgroup.com