diff options
-rwxr-xr-x | tests/misc/timeout-group.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/misc/timeout-group.sh b/tests/misc/timeout-group.sh index 4cefc33bf..7117abb5a 100755 --- a/tests/misc/timeout-group.sh +++ b/tests/misc/timeout-group.sh @@ -34,7 +34,11 @@ cat > timeout.cmd <<\EOF #!/bin/sh trap 'touch int.received; exit' INT touch timeout.running -sleep $1 +count=$1 +until test -e int.received || test $count = 0; do + sleep 1 + count=$(expr $count - 1) +done EOF chmod a+x timeout.cmd |