From owner-freebsd-arch Sun Nov 25 15: 5:41 2001 Delivered-To: freebsd-arch@freebsd.org Received: from obsecurity.dyndns.org (adsl-64-165-226-105.dsl.lsan03.pacbell.net [64.165.226.105]) by hub.freebsd.org (Postfix) with ESMTP id 3E11137B416; Sun, 25 Nov 2001 15:05:32 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id E4B9F66C79; Sun, 25 Nov 2001 15:05:31 -0800 (PST) Date: Sun, 25 Nov 2001 15:05:31 -0800 From: Kris Kennaway To: Robert Watson Cc: Kris Kennaway , Ian Dowse , arch@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/tail forward.c Message-ID: <20011125150531.A93698@xor.obsecurity.org> References: <20011125144540.A93369@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="9jxsPFA5p3P2qPhR" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from rwatson@FreeBSD.org on Sun, Nov 25, 2001 at 05:55:42PM -0500 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --9jxsPFA5p3P2qPhR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Nov 25, 2001 at 05:55:42PM -0500, Robert Watson wrote: >=20 > > On Sun, Nov 25, 2001 at 10:03:28AM -0800, Ian Dowse wrote: > > > iedowse 2001/11/25 10:03:28 PST > > >=20 > > > Modified files: > > > usr.bin/tail forward.c=20 > > > 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. > > > =20 > > > 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. > >=20 > > 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?=20 >=20 > 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. It would be nice if this could be abstracted somehow so the application doesn't have to do both. Most application writers are going to forget this. Kris --9jxsPFA5p3P2qPhR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE8AXjBWry0BWjoQKURAtD7AJ0fYBlnravAPCvuGMBB3F5gsMEaxQCgn3+f lWQRtyI64PTVr77p8vUcQN8= =DECu -----END PGP SIGNATURE----- --9jxsPFA5p3P2qPhR-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message