]> git.ipfire.org Git - thirdparty/coreutils.git/commit
tail: fix output of redundant headers when resuming
authorJanne Snabb <snabb@epipe.com>
Tue, 7 Feb 2017 07:15:42 +0000 (23:15 -0800)
committerPádraig Brady <P@draigBrady.com>
Wed, 8 Feb 2017 22:42:18 +0000 (14:42 -0800)
commit1ddcd24d52afbe9af1d7d8712674eed2221cef97
tree6bc146fff6ee40542df3a0fac7f7f5c6168292fa
parentc95c0a0fd4b8dc72a66484f3f361a3afb9acdc94
tail: fix output of redundant headers when resuming

* src/tail.c (check_fspec): Only enable printing of the file header
if we've actually read some data and this is a new file.  Also
move printing of the file header to...
(dump_remainder): ...here, to allow printing only when data read.
* tests/tail-2/overlay-headers.sh: A new test for suspension
and resumption of tail.
* tests/local.mk: Reference the new test.
* NEWS: Mention the fix.
Fixes http://bugs.gnu.org/23539
NEWS
src/tail.c
tests/local.mk
tests/tail-2/overlay-headers.sh [new file with mode: 0755]