summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-07-17 12:47:22 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-07-17 12:52:55 -0700
commit7e576fc40357fa9c5d702b2435aca88884d906f1 (patch)
tree51797345ae3e0cd7ac6f762ce62c090a469a0c1c
parent240a63375697be8f3ff0fb97aea35ef2fecf1f4d (diff)
downloadcoreutils-7e576fc40357fa9c5d702b2435aca88884d906f1.tar.xz
timeout: add regression test (Bug#9098)
* tests/misc/timeout: Check that 'timeout' is not confused when starting off with a child.
-rwxr-xr-xtests/misc/timeout5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/misc/timeout b/tests/misc/timeout
index 7506e7cf9..04465e116 100755
--- a/tests/misc/timeout
+++ b/tests/misc/timeout
@@ -51,4 +51,9 @@ test $? = 124 && fail=1
exec timeout 10 true
) || fail=1
+# Don't be confused when starting off with a child (Bug#9098).
+out=$(sleep 1 & exec timeout 2 sh -c 'sleep 3; echo foo')
+status=$?
+test "$out" = "" && test $status = 124 || fail=1
+
Exit $fail