diff options
Diffstat (limited to 'tests/misc')
-rwxr-xr-x | tests/misc/timeout | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/misc/timeout b/tests/misc/timeout index 77a42053b..aae45f7f9 100755 --- a/tests/misc/timeout +++ b/tests/misc/timeout @@ -23,7 +23,6 @@ fi . $srcdir/test-lib.sh - # no timeout timeout 1 true || fail=1 @@ -42,4 +41,14 @@ test $? = 2 || fail=1 timeout 1 sleep 2 test $? = 124 || fail=1 +# Ensure `timeout` is immune to parent's SIGCHLD handler +# Use a subshell and an exec to work around a bug in FreeBSD 5.0 /bin/sh. +( + # ash doesn't support "trap '' CHLD"; it knows only signal numbers. + sig=`"$abs_top_builddir/src/kill" -l CHLD 2>/dev/null` && trap '' $sig + + # Before 2004-04-21, install would infloop, in the `while (wait...' loop: + exec timeout 1 true +) || fail=1 + Exit $fail |