]> 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>
Tue, 2 Feb 2021 00:21:14 +0000 (16:21 -0800)
commit7787e7eed9d2a43fb6eb66666040f1b495995a2f
treeadde0569f91b3494cbfb6a1cdbd59a1f09470993
parent1912d2b15e6d6f4a1d8c3886b03ab30d2f21f3fd
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
usr.bin/tail/forward.c