]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
tail: fix "tail -F" file rotation detection
authorChuck Silvers <chs@FreeBSD.org>
Tue, 2 Feb 2021 00:21:14 +0000 (16:21 -0800)
committerChuck Silvers <chs@FreeBSD.org>
Thu, 18 Mar 2021 20:12:24 +0000 (13:12 -0700)
commit8c59e863e2c03c3b4ab2c403243561a4cc4fcb10
treedb1616dcc85595289c863ac2638471c7a68f4ba4
parent120a4bd4e9d05147a9774a2ca4b4eff48e062442
tail: fix "tail -F" file rotation detection

When checking if the newly opened file is the same as the old one,
we need to fstat() the new file descriptor, not the old one again.

Reviewed by: glebius
Sponsored by: Netflix

(cherry picked from commit 7787e7eed9d2a43fb6eb66666040f1b495995a2f)
usr.bin/tail/forward.c