Unverified Commit d8216503 authored by copilot-swe-agent[bot]'s avatar copilot-swe-agent[bot] Committed by GitHub
Browse files

fix: avoid misleading kill attempt after graceful shutdown

parent 4643c9f3
Loading
Loading
Loading
Loading
+17 −12
Original line number Diff line number Diff line
@@ -31,6 +31,9 @@ finish() {
  if [ -s "$QEMU_PID" ]; then

    pid=$(<"$QEMU_PID")

    if isAlive "$pid"; then

      echo && error "Forcefully terminating QEMU, reason: $reason..."
      { kill -15 "$pid" || true; } 2>/dev/null

@@ -51,6 +54,8 @@ finish() {

    fi

  fi

  for pid in "${pids[@]}"; do
      if [[ -s "$pid" ]]; then 
          pKill "$(<"$pid")"