oops, $2 cannot be empty in this case lmao

Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
2026-11-29 13:38:17 +00:00
parent ce582dd51f
commit eb591543af
+5 -1
View File
@@ -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 && {