]> git.ipfire.org Git - thirdparty/coreutils.git/commit
tail: display file headers correctly with inotify
authorPádraig Brady <P@draigBrady.com>
Mon, 8 Jun 2015 23:53:35 +0000 (00:53 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 9 Jun 2015 10:14:57 +0000 (11:14 +0100)
commit6878ae412d8e7fb65ad77a3d68af986377d9d977
tree30712969051f5a906f93e57a7d1e4c7a2cf18011
parent8f2231aa2466963b43e228fc4b6066dd519da4d0
tail: display file headers correctly with inotify

* src/tail.c (tail_forever_inotify): Use the fspec pointer to
distinguish previously output files, rather than a descriptor
from the inotify event.  That event descriptor was that of
the parent directory when files were created or renamed etc.
(check_fspec): Adjust for the new comparison.  Also show the
header when the file is truncated, since we show data
in this case also.
* tests/tail-2/F-headers.sh: A new test case.
* tests/local.mk: Reference the new test.
* NEWS: Mention the bug fix.
NEWS
src/tail.c
tests/local.mk
tests/tail-2/F-headers.sh [new file with mode: 0755]