oops, $2 cannot be empty in this case lmao
Signed-off-by: fbt <fbt@fleshless.org>
This commit is contained in:
@@ -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 && {
|
||||
|
||||
Reference in New Issue
Block a user