Date: Wed, 28 Mar 2001 08:44:57 +0100 From: David Malone <dwmalone@maths.tcd.ie> To: "Andrey A. Chernov" <ache@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/tail forward.c Message-ID: <20010328084457.A91235@walton.maths.tcd.ie> In-Reply-To: <200103272324.f2RNOQc56458@freefall.freebsd.org>; from ache@FreeBSD.org on Tue, Mar 27, 2001 at 03:24:26PM -0800 References: <200103272324.f2RNOQc56458@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 27, 2001 at 03:24:26PM -0800, Andrey A. Chernov wrote: > Restore part of my fix spammed in v1.23: I actually discussed this with Ian before committing, so spammed is a bit strong. ;-) > fseeko(file_size, SEEK_SET) -> fseek(0L, SEEK_END) > 1) File may grows between operations, so fseeko to file_size may miss > 2) 0L, SEEK_END is the same code using in tail in all other places The problem is that you only want to seek to the end of the data you have already displayed, not to the end of the file. Otherwise if you are using "tail -f" and the file grows between the original stat and the fseek you will not print the data in between. Can you confirm that fseeko(file_size, SEEK_SET) is actually correct? David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010328084457.A91235>