summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-22 18:24:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-07-22 18:24:03 (GMT)
commita0c1aa216130680f890ded9e057bae24b0610d98 (patch)
treef1141f4b0266492021c0eafb3c5e8882b06db363 /t
parentd3aeb31dc410a71ee41b87328f0d71996417294f (diff)
parent4783e7ea83e39f19e0ef03372fd721f159d1f1de (diff)
downloadgit-a0c1aa216130680f890ded9e057bae24b0610d98.zip
git-a0c1aa216130680f890ded9e057bae24b0610d98.tar.gz
git-a0c1aa216130680f890ded9e057bae24b0610d98.tar.bz2
Merge branch 'jk/t0008-sigpipe-fix'
Fix for recent test breakage on 'master'. * jk/t0008-sigpipe-fix: t0008: avoid SIGPIPE race condition on fifo
Diffstat (limited to 't')
-rwxr-xr-xt/t0008-ignores.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/t/t0008-ignores.sh b/t/t0008-ignores.sh
index a56db80..c29342d 100755
--- a/t/t0008-ignores.sh
+++ b/t/t0008-ignores.sh
@@ -697,13 +697,21 @@ test_expect_success PIPE 'streaming support for --stdin' '
# shell, and then echo to the fd. We make sure to close it at
# the end, so that the subprocess does get EOF and dies
# properly.
+ #
+ # Similarly, we must keep "out" open so that check-ignore does
+ # not ever get SIGPIPE trying to write to us. Not only would that
+ # produce incorrect results, but then there would be no writer on the
+ # other end of the pipe, and we would potentially block forever trying
+ # to open it.
exec 9>in &&
+ exec 8<out &&
test_when_finished "exec 9>&-" &&
+ test_when_finished "exec 8<&-" &&
echo >&9 one &&
- read response <out &&
+ read response <&8 &&
echo "$response" | grep "^\.gitignore:1:one one" &&
echo >&9 two &&
- read response <out &&
+ read response <&8 &&
echo "$response" | grep "^:: two"
'