Use handle_child_status when reaping internal procs

This reduces the number of distinct locations where we mark a process as
completed.
This commit is contained in:
ridiculousfish 2020-01-13 14:12:05 -08:00
parent 69b464bc37
commit 8d598dcffc

View File

@ -358,8 +358,7 @@ static void process_mark_finished_children(parser_t &parser, bool block_ok) {
if (proc->internal_proc_) {
// Try reaping an internal process.
if (proc->internal_proc_->exited()) {
proc->status = proc->internal_proc_->get_status();
proc->completed = true;
handle_child_status(proc.get(), proc->internal_proc_->get_status());
FLOGF(proc_reap_internal,
"Reaped internal process '%ls' (id %llu, status %d)",
proc->argv0(), proc->internal_proc_->get_id(),