fix: Kill QEMU after 5 seconds if it hangs

This commit is contained in:
Kroese 2025-10-19 17:50:07 +02:00 committed by GitHub
parent ac106067bd
commit 8e01b2c106
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -89,15 +89,15 @@ finish() {
sleep 1
cnt=$((cnt+1))
# Workaround for zombie pid
[ ! -s "$QEMU_PID" ] && break
if [ "$cnt" == "5" ]; then
error "QEMU did not terminate itself, forcefully killing process..."
{ kill -9 "$pid" || true; } 2>/dev/null
fi
done
fi