Unverified Commit fe6bf5b7 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

fix: Hide bash termination message (#1088)

parent 231e94e7
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ finish() {
    if read -r pid <"$QEMU_PID"; then
      if [ -n "$pid" ] && isAlive "$pid"; then
        echo && error "Forcefully terminating $(app), reason: $reason..."
        { kill -9 -- "$pid" || :; } 2>/dev/null
        { kill -9 -- "$pid" && wait $! || :; } 2>/dev/null
      fi
    fi
  fi
@@ -78,8 +78,6 @@ _graceful_shutdown() {
  touch "$QEMU_END"
  echo && info "Received $1, sending ACPI shutdown signal..."

  local pid=""

  if [ ! -s "$QEMU_PID" ] || ! read -r pid <"$QEMU_PID"; then
    warn "QEMU PID file ($QEMU_PID) does not exist?"
    finish "$code"
@@ -115,7 +113,7 @@ _graceful_shutdown() {
      fi
    else
      info "$(app) is still running, sending SIGTERM... ($cnt/$max)"
      { kill -15 -- "$pid" || true; } 2>/dev/null
      { kill -15 -- "$pid" && wait $! || :; } 2>/dev/null
    fi

    # Send ACPI shutdown signal
+2 −2
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ waitPid() {
pKill() {
  local pid="$1"

  { kill -15 -- "$pid" || :; } 2>/dev/null
  { kill -15 -- "$pid" && wait $! || :; } 2>/dev/null

  if ! waitPid "$pid" 50; then
    warn "Timed out while waiting for PID $pid"
@@ -98,7 +98,7 @@ mKill() {
    
    if read -r pid <"$file"; then
      if [ -n "$pid" ]; then
        { kill -15 -- "$pid" || :; } 2>/dev/null
        { kill -15 -- "$pid" && wait $! || :; } 2>/dev/null
      fi
    fi

+1 −1

File changed.

Contains only whitespace changes.