diff options
Diffstat (limited to 'tests/tail-2/F-vs-rename.sh')
-rwxr-xr-x | tests/tail-2/F-vs-rename.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/tail-2/F-vs-rename.sh b/tests/tail-2/F-vs-rename.sh index e087ec2e8..ee61a548b 100755 --- a/tests/tail-2/F-vs-rename.sh +++ b/tests/tail-2/F-vs-rename.sh @@ -28,6 +28,9 @@ check_tail_output() { sleep $delay; return 1; } } +# Terminate any background tail process +cleanup_() { kill $pid 2>/dev/null && wait $pid; } + # Speedup the non inotify case fastpoll='-s.1 --max-unchanged-stats=1' @@ -74,9 +77,7 @@ for mode in '' '---disable-inotify'; do retry_delay_ tail_f_vs_rename_3 .1 7 || { echo "$0: a: unexpected delay?"; cat out; fail=1; } - kill $pid - - wait $pid + cleanup_ done Exit $fail |