mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
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
This commit is contained in:
parent
fbe1513849
commit
7b51f66476
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118900
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user