timeout: add regression test (Bug#9098)

* tests/misc/timeout: Check that 'timeout' is not confused when
starting off with a child.
This commit is contained in:
Paul Eggert committed 2011-07-17 12:52:55 -07:00
1 parent 240a633756
commit 7e576fc403
1 file changed
+5
+5
View File
@@ -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