mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-07-03 10:01:16 -03:00
Stop storing block_io in job_t
Prior to this fix, a job would hold onto any IO redirections from its
parent. For example:
begin
echo a
end < file.txt
The "echo a" job would hold a reference to the I/O redirection.
The problem is that jobs then extend the life of pipes until the job is
cleaned up. This can prevent pipes from closing, leading to hangs.
Fix this by not storing the block IO; this ensures that jobs do not
prolong the life of pipes.
Fixes #6397
This commit is contained in:
@@ -1348,7 +1348,7 @@ parse_execution_result_t parse_execution_context_t::run_1_job(tnode_t<g::job> jo
|
||||
}
|
||||
|
||||
// Actually execute the job.
|
||||
if (!exec_job(*this->parser, job)) {
|
||||
if (!exec_job(*this->parser, job, lineage)) {
|
||||
remove_job(*this->parser, job.get());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user