Skip to content

Commit

Permalink
Log a warning if not able to supervise bgprocess
Browse files Browse the repository at this point in the history
If we can't supervise a bgprocess (which should only be because the PID
is not actually a child of the dinit process), log a warning.
  • Loading branch information
davmac314 committed Oct 1, 2024
1 parent 6a854d3 commit d10e79d
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 @@ -737,6 +737,7 @@ bgproc_service::read_pid_file(proc_status_t *exit_status) noexcept
if (waitid_r == -1 && errno == ECHILD) {
// We can't track this child - check process exists:
if (bp_sys::kill(pid, 0) == 0 || errno != ESRCH) {
log(loglevel_t::WARN, get_name(), ": unable to supervise process with pid ", pid);
tracking_child = false;
return pid_result_t::OK;
}
Expand Down

0 comments on commit d10e79d

Please sign in to comment.