From owner-freebsd-hackers Mon Oct 29 10:48:40 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from dragon.nuxi.com (trang.nuxi.com [66.92.13.169]) by hub.freebsd.org (Postfix) with ESMTP id 52C9437B407; Mon, 29 Oct 2001 10:48:35 -0800 (PST) Received: (from obrien@localhost) by dragon.nuxi.com (8.11.6/8.11.1) id f9TImXu11727; Mon, 29 Oct 2001 10:48:33 -0800 (PST) (envelope-from obrien) Date: Mon, 29 Oct 2001 10:48:32 -0800 From: "David O'Brien" To: Terry Lambert Cc: Mike Barcroft , void , Kris Kennaway , hackers@FreeBSD.ORG Subject: Re: syslogd and kqueue Message-ID: <20011029104832.A11707@dragon.nuxi.com> Reply-To: obrien@FreeBSD.ORG References: <20011026200436.A61058@xor.obsecurity.org> <20011027043342.A18231@parhelion.firedrake.org> <20011027001704.B2586@coffee.q9media.com> <20011027002622.C2586@coffee.q9media.com> <20011028180643.B59388@dragon.nuxi.com> <3BDCCFB2.1E5CFC49@mindspring.com> <20011028202345.A60175@dragon.nuxi.com> <3BDD8557.A2190693@mindspring.com> <20011029093252.A2425@dragon.nuxi.com> <3BDD94FB.B9B87153@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3BDD94FB.B9B87153@mindspring.com>; from tlambert2@mindspring.com on Mon, Oct 29, 2001 at 09:42:19AM -0800 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Oct 29, 2001 at 09:42:19AM -0800, Terry Lambert wrote: > David O'Brien wrote: > > > > On Mon, Oct 29, 2001 at 08:35:35AM -0800, Terry Lambert wrote: > > > > No muss, no fuss. So where is the race? > > > > Mike had the only justification so far -- that of permissions of the > > > > file. > > > > > > Think multiple instances of syslogd. > > > > You are going to have to help me out a little bit more -- I can think of > > no problems with what I proposed vs. the existing way. Both have a race > > of which daemon opens the file first. > > Not if you don't use O_CREAT; then they don't. Why not? If the file exists and I start up two syslogd's, there is a race of which one open's the file first. If I start up two syslogd's and the file does not exist and then I touch the file. There will be a race if I ``kill -HUP ''. If I take care to HUP only one syslogd, move the file to the side, touch the file again and HUP the second syslogd there is no race. I can similarly take this amount of care with the way I would like syslogd to work such that there is no race. -- -- David (obrien@FreeBSD.org) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message