diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-05-11 14:25:19 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-05-11 23:16:14 +0100 |
commit | b28ff6a3c6ad25d877b63013af245de5d6c70b10 (patch) | |
tree | e1e0d4e15c02f8041b930e5fb9902334c295a9b2 /NEWS | |
parent | cf06a872e74b45588c2e64903f7fc99cf2aafe27 (diff) | |
download | coreutils-b28ff6a3c6ad25d877b63013af245de5d6c70b10.tar.xz |
tail: consistently output all data for truncated files
Generally if logs are truncated, they're truncated to 0 length,
so output all existing data when our heuristic determines truncation.
Note with inotify, truncate() and write() are often determined
independently and so all data would be written if that was the case.
* src/tail.c (check_fspec): Reset file offset to 0 upon truncation.
(tail_forever): Likewise.
(recheck): Add a FIXME for the related issue where tail may lose
data due to tail discounting older log files too early.
* tests/tail-2/truncate.sh: A new test.
* tests/local.mk: Reference the new test.
* NEWS: Mention the fix.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -49,6 +49,9 @@ GNU coreutils NEWS -*- outline -*- replaced before inotify watches were created. [bug introduced in coreutils-7.5] + tail --follow consistently outputs all data for a truncated file. + [bug introduced in the beginning] + ** New features chroot accepts the new --skip-chdir option to not change the working directory |