File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -697,13 +697,21 @@ test_expect_success PIPE 'streaming support for --stdin' '
697
697
# shell, and then echo to the fd. We make sure to close it at
698
698
# the end, so that the subprocess does get EOF and dies
699
699
# properly.
700
+ #
701
+ # Similarly, we must keep "out" open so that check-ignore does
702
+ # not ever get SIGPIPE trying to write to us. Not only would that
703
+ # produce incorrect results, but then there would be no writer on the
704
+ # other end of the pipe, and we would potentially block forever trying
705
+ # to open it.
700
706
exec 9>in &&
707
+ exec 8<out &&
701
708
test_when_finished "exec 9>&-" &&
709
+ test_when_finished "exec 8<&-" &&
702
710
echo >&9 one &&
703
- read response <out &&
711
+ read response <&8 &&
704
712
echo "$response" | grep "^\.gitignore:1:one one" &&
705
713
echo >&9 two &&
706
- read response <out &&
714
+ read response <&8 &&
707
715
echo "$response" | grep "^:: two"
708
716
'
709
717
You can’t perform that action at this time.
0 commit comments