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 /tests/pr/o3b3l24f-tn | |
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 'tests/pr/o3b3l24f-tn')
0 files changed, 0 insertions, 0 deletions