Change when PENDING_REMOVAL jobs are removed

Followup to 394623b.

Doing it in the parser meant only top-level jobs would be reaped after
being `disown`ed, as subjobs aren't directly handled by the parser.

This is also much cleaner, as now job removal is centralized in
`process_clean_after_marking()`.

Closes #5803.
This commit is contained in:
Mahmoud Al-Qudsi
2019-04-10 10:56:33 -05:00
parent 83e72c912d
commit 04a96f6c6e
3 changed files with 8 additions and 7 deletions

View File

@@ -1269,11 +1269,6 @@ parse_execution_result_t parse_execution_context_t::run_1_job(tnode_t<g::job> jo
remove_job(job.get());
}
// This job was disowned during its own execution or the execution of its subjobs
if (job->get_flag(job_flag_t::PENDING_REMOVAL)) {
remove_job(job.get());
}
// Only external commands require a new fishd barrier.
if (job_contained_external_command) {
set_proc_had_barrier(false);