From eb591543af97856fbf0249d93388906775b6455e Mon Sep 17 00:00:00 2001 From: fbt Date: Sun, 29 Nov 2026 13:38:17 +0000 Subject: [PATCH] oops, $2 cannot be empty in this case lmao Signed-off-by: fbt --- ssm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 && {