Skip to content

Commit

Permalink
fix: 2nd restart of bgprocess service hangs
Browse files Browse the repository at this point in the history
Because stop_issued is not reset when a bgprocess service stops, the
next time we try to stop the service we don't actually signal it. This
causes a hang (including at shutdown).
  • Loading branch information
davmac314 committed Oct 1, 2024
1 parent d10e79d commit 2bf3e7d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/proc-service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ void bgproc_service::handle_exit_status() noexcept
// We won't log a non-zero exit status or termination due to signal here -
// we assume that the process died because we signalled it.
if (stop_pid == -1 && !waiting_for_execstat) {
stop_issued = false;
stopped();
}
}
Expand Down

0 comments on commit 2bf3e7d

Please sign in to comment.