Skip to content

Commit

Permalink
Merge pull request #2413 from saschagrunert/debug
Browse files Browse the repository at this point in the history
Print child ID and error if command failed
  • Loading branch information
openshift-merge-bot[bot] authored Sep 10, 2024
2 parents 45a0edb + 1cf5264 commit f163d95
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions conmon-rs/server/src/child_reaper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ impl ChildReaper {
.spawn()
.context("spawn child process: {}")?;

debug!(
"Running child on PID: {}",
child.id().map_or("unknown".into(), |x| x.to_string())
);

// close file descriptors after spawn
drop(additional_fds);

Expand Down Expand Up @@ -140,6 +145,7 @@ impl ChildReaper {
// Wait to ensure that all children do not become zombies.
Self::check_child_processes();

error!("Failed: {err_str}");
bail!(err_str)
}

Expand Down

0 comments on commit f163d95

Please sign in to comment.