From 8e01b2c10677d03ef9d21054fac416ea0e7b84eb Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 19 Oct 2025 17:50:07 +0200 Subject: [PATCH] fix: Kill QEMU after 5 seconds if it hangs --- src/power.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/power.sh b/src/power.sh index 72b60fd..136dc29 100644 --- a/src/power.sh +++ b/src/power.sh @@ -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