diff --git a/ssm b/ssm index e23e045..0bddb14 100755 --- a/ssm +++ b/ssm @@ -309,7 +309,11 @@ readonly -f nullexec anywait() { declare counter timeout var counter = 0 - var timeout = $(( $2 * 10 )) # We sleep for 0.1, but the timeout is given in seconds. + var timeout + + if [[ $2 ]]; then + timeout = $(( $2 * 10 )) # We sleep for 0.1, but the timeout is given in seconds. + fi while nullexec kill -0 "$1"; do timeout && {