From owner-cvs-all Sun Nov 25 14:56: 4 2001 Delivered-To: cvs-all@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id 09EE137B405; Sun, 25 Nov 2001 14:55:57 -0800 (PST) Received: from fledge.watson.org (robert@fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.11.6/8.11.5) with SMTP id fAPMthi79851; Sun, 25 Nov 2001 17:55:43 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Sun, 25 Nov 2001 17:55:42 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Kris Kennaway Cc: Ian Dowse , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/tail forward.c In-Reply-To: <20011125144540.A93369@xor.obsecurity.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > On Sun, Nov 25, 2001 at 10:03:28AM -0800, Ian Dowse wrote: > > iedowse 2001/11/25 10:03:28 PST > > > > Modified files: > > usr.bin/tail forward.c > > Log: > > Since kqueue support was added to tail, the "-F" option (check for > > renames/rotations) only detected cases where the file itself was > > moved or deleted. If part of the path to the file (or a symlink > > in the path) was changed instead, tail would not notice. > > > > Fix this by ensuring that we stat the path at least once every > > second in the -F case to check for changes. We still use kqueue > > when possible to inform us quickly when the file has changed. > > Hmm, this strikes me as a bit nasty...ideally you shouldn't have to poll > for any status changes in a kqueue world. Is there an easy way kq could > be improved to handle this? Note that, regardless of kq supporting non-polling, most applications need to know how to poll anyway so as to support non-local file systems that don't send around event information (nfs, etc). tail has such logic for nonkqe-aware file systems, and others will need it also. Robert N M Watson FreeBSD Core Team, TrustedBSD Project robert@fledge.watson.org NAI Labs, Safeport Network Services To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message