tail: only retry file open if --retry specifed
commit4d45722d1160a04e4d26fd812da4e0140ad3550c
authorPádraig Brady <P@draigBrady.com>
Wed, 9 Nov 2016 19:28:23 +0000 (9 19:28 +0000)
committerPádraig Brady <P@draigBrady.com>
Thu, 10 Nov 2016 12:43:42 +0000 (10 12:43 +0000)
tree7262a438a66980918a438e6103563c54b80bfbf0
parent659060233ff2cff324be5cf4cc40b782068d45fd
tail: only retry file open if --retry specifed

* src/tail.c (tail_file): On failure to open a file,
set ignore=true when --retry is not specified.
* tests/tail-2/assert-2.sh: Adjust to the new behavior.
* tests/tail-2/retry.sh: Add a test case.  Also change
from `tail ... && fail=1` to the more robust `returns_ 1 ...`
construct which detects segfaults etc.
* NEWS: Document the fix.
NEWS
src/tail.c
tests/tail-2/assert-2.sh
tests/tail-2/retry.sh