Fix zombie job on failed redirection in exec_job

Closes #5346.
This commit is contained in:
Mahmoud Al-Qudsi
2018-11-18 17:14:08 -06:00
parent a8ce7bad7b
commit d0085cae3c
3 changed files with 14 additions and 13 deletions

View File

@@ -1232,7 +1232,9 @@ parse_execution_result_t parse_execution_context_t::run_1_job(tnode_t<g::job> jo
}
// Actually execute the job.
exec_job(*this->parser, job);
if (!exec_job(*this->parser, job)) {
parser->job_remove(job.get());
}
// Only external commands require a new fishd barrier.
if (job_contained_external_command) {