Loading src/power.sh +11 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ _trap() { finish() { local pid local cnt=0 local reason=$1 touch "$QEMU_END" Loading @@ -44,10 +45,20 @@ finish() { { kill -15 "$pid" || true; } 2>/dev/null while isAlive "$pid"; do 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 fKill "print.sh" Loading Loading
src/power.sh +11 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ _trap() { finish() { local pid local cnt=0 local reason=$1 touch "$QEMU_END" Loading @@ -44,10 +45,20 @@ finish() { { kill -15 "$pid" || true; } 2>/dev/null while isAlive "$pid"; do 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 fKill "print.sh" Loading