From 0ed08c885f1ed51fabdb056af02a8e36345fe73f Mon Sep 17 00:00:00 2001 From: dg Date: Thu, 14 Aug 2003 11:02:03 +0000 Subject: Removed check of st_rdev changing in the -F support. st_rdev for regular files is usually the first direct block pointer. Since FreeBSD does automatic block reallocation to reduce filesystem fragmentation, the file being tailed can be relocated to different blocks 'on-the-fly', making the check for st_rdev unreliable. The result of this bug is tail -F pseudo-randomnly thinking the file was rotated when it wasn't, and as a result, spews out the entire file trying to catch up. MFC after: 3 days --- usr.bin/tail/forward.c | 1 - 1 file changed, 1 deletion(-) (limited to 'usr.bin') diff --git a/usr.bin/tail/forward.c b/usr.bin/tail/forward.c index 25facec..883ea9a 100644 --- a/usr.bin/tail/forward.c +++ b/usr.bin/tail/forward.c @@ -253,7 +253,6 @@ forward(fp, style, off, sbp) (void)sleep(1); if (sb2.st_ino != sbp->st_ino || sb2.st_dev != sbp->st_dev || - sb2.st_rdev != sbp->st_rdev || sb2.st_nlink == 0) { fp = freopen(fname, "r", fp); if (fp == NULL) { -- cgit v1.1