From owner-freebsd-arch Tue Feb 20 13:18:52 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mail.wgate.com (mail.wgate.com [38.219.83.4]) by hub.freebsd.org (Postfix) with ESMTP id DDEB837B401 for ; Tue, 20 Feb 2001 13:18:47 -0800 (PST) (envelope-from rjesup@wgate.com) Received: from jesup.eng.tvol.net ([10.32.2.26]) by mail.wgate.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2653.13) id 152CZ9Z8; Tue, 20 Feb 2001 16:18:34 -0500 Reply-To: Randell Jesup To: Jonathan Lemon Cc: Jonathan Graehl , freebsd-arch@FreeBSD.ORG Subject: Re: modifying config files for a running daemon References: <20010220105723.C85542@prism.flugsvamp.com> <20010220145843.D85542@prism.flugsvamp.com> From: Randell Jesup Date: 20 Feb 2001 16:19:10 -0500 In-Reply-To: Jonathan Lemon's message of "Tue, 20 Feb 2001 14:58:43 -0600" Message-ID: User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jonathan Lemon writes: >On Tue, Feb 20, 2001 at 12:48:19PM -0800, Jonathan Graehl wrote: >> Is there any way to be sure of receiving a change notification only >> after the writer has closed the file? > >No, I don't think so. But even if that was the case, it doesn't eliminate >the race condition where another process can open the file after the >notification was sent. Assuming the writers are using flock() (exclusive), you have the reader use flock() (perhaps/probably in shared mode). As the original author said, this doesn't obviate the need to deal with locks. -- Randell Jesup, Worldgate Communications, ex-Scala, ex-Amiga OS team ('88-94) rjesup@wgate.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message