mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-12-13 17:34:00 +08:00
c0b3be9fb4
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
18 lines
200 B
Fish
18 lines
200 B
Fish
#RUN: %fish %s
|
|
|
|
# See #6397
|
|
|
|
function f --on-signal USR1
|
|
begin
|
|
echo a
|
|
echo b
|
|
end | while read -l line
|
|
echo $line
|
|
end
|
|
end
|
|
|
|
kill -USR1 $fish_pid
|
|
|
|
#CHECK: a
|
|
#CHECK: b
|