mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-21 03:12:48 +02:00
tests: tail-2/assert: reduce risk of race condition
* tests/tail2/assert: This reverts commit be853120, 25-08-2009,
"tests: tail-2/assert: avoid risk of race condition"
kill -0 doesn't send a signal and so will only confirm that the
background process was forked, which we know already because
we have its pid.
This commit is contained in:
@@ -42,13 +42,9 @@ tail_pid=$!
|
|||||||
|
|
||||||
echo sleeping for 7 seconds...
|
echo sleeping for 7 seconds...
|
||||||
|
|
||||||
# Wait for the backgrounded `tail' to start before removing foo.
|
# Give the backgrounded `tail' a chance to start before removing foo.
|
||||||
# Otherwise, without --retry, tail wouldn't try to open `foo' again.
|
# Otherwise, without --retry, tail wouldn't try to open `foo' again.
|
||||||
while :; do
|
sleep 1
|
||||||
env kill -0 $tail_pid && break
|
|
||||||
echo sleep .1
|
|
||||||
sleep .1
|
|
||||||
done
|
|
||||||
|
|
||||||
rm -f foo
|
rm -f foo
|
||||||
sleep 6
|
sleep 6
|
||||||
|
|||||||
Reference in New Issue
Block a user