diff options
author | Bernhard Voelker <mail@bernhard-voelker.de> | 2013-04-20 16:34:23 +0200 |
---|---|---|
committer | Bernhard Voelker <mail@bernhard-voelker.de> | 2013-04-20 16:34:23 +0200 |
commit | 8f97679836d9d03b687cb854dbda52a8fbf9823f (patch) | |
tree | 8833d176bf264eed2caaa3c8123e81343025e7a1 /tests/misc/stty-row-col.sh | |
parent | d461bfd2743547360793acd2118d4c08ad7b84a8 (diff) | |
download | coreutils-8f97679836d9d03b687cb854dbda52a8fbf9823f.tar.xz |
tail: exit following by descriptor when no tailable file left
As a side effect of the previous commit which fixes 'tail -f --retry'
to wait for a file to appear, tail would not exit when the last file
appears untailable and gives up on this file.
This can happen, for example, when the argument file name appears
as directory. Tail sets the 'ignore' flag of this file to true,
but instead of exiting the program, tail would continue the loop.
* src/tail.c (any_live_files): Change the function to return true
if any of the files is still tailable or if tail should continue to
try to check again.
(tail_forever): Change the condition to break the loop in the
"no files remaining" case, because now any_live_files() will care
about it, as mentioned above.
(parse_options): When --retry is used without any follow mode,
then reset reopen_inaccessible_files to false.
* tests/tail-2/retry.sh: Add test case.
Diffstat (limited to 'tests/misc/stty-row-col.sh')
0 files changed, 0 insertions, 0 deletions