projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a8f184
)
Avoid race condition that could cause
author
Jim Meyering
<jim@meyering.net>
Wed, 24 Mar 2004 12:13:12 +0000
(12:13 +0000)
committer
Jim Meyering
<jim@meyering.net>
Wed, 24 Mar 2004 12:13:12 +0000
(12:13 +0000)
spurious failure. Based on a patch from Andreas Schwab.
tests/tail-2/assert
patch
|
blob
|
history
diff --git
a/tests/tail-2/assert
b/tests/tail-2/assert
index
49e62c4
..
a837798
100755
(executable)
--- a/
tests/tail-2/assert
+++ b/
tests/tail-2/assert
@@
-30,9
+30,15
@@
tail --follow=name a foo > err 2>&1 &
tail_pid=$!
# Arrange for the tail process to die after 12 seconds.
(sleep 12; kill $tail_pid) &
-rm -f foo
+
echo sleeping for 7 seconds...
-sleep 7
+
+# Give the backgrounded `tail' a chance to start before removing foo.
+# Otherwise, without --retry, tail wouldn't try to open `foo' again.
+sleep 1
+
+rm -f foo
+sleep 6
echo $ok > f
mv f foo