diff options
Diffstat (limited to 'tests/tail-2/wait.sh')
-rwxr-xr-x | tests/tail-2/wait.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/tail-2/wait.sh b/tests/tail-2/wait.sh index ebae62bd2..071d889d6 100755 --- a/tests/tail-2/wait.sh +++ b/tests/tail-2/wait.sh @@ -23,6 +23,9 @@ print_ver_ tail touch here || framework_failure_ { touch unreadable && chmod a-r unreadable; } || framework_failure_ +# Terminate any background tail process +cleanup_() { kill $pid 2>/dev/null && wait $pid; } + # speedup non inotify case fastpoll='-s.1 --max-unchanged-stats=1' @@ -72,8 +75,7 @@ for mode in '' '---disable-inotify'; do sleep $delay echo NO >> l sleep $delay - kill $pid - wait $pid + cleanup_ rm -f k l test -s tail.out |