summaryrefslogtreecommitdiff
path: root/Documentation/git-branch.txt
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2021-09-15 13:24:52 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-15 13:06:50 -0700
commit7c1200745bec3034c98d6e44bd5f620849dbe2ba (patch)
treeddecae66aba4d4f3e3188023b22d93fc5394077a /Documentation/git-branch.txt
parentupdate-ref: fix streaming of status updates (diff)
downloadtgif-7c1200745bec3034c98d6e44bd5f620849dbe2ba.tar.xz
t1400: avoid SIGPIPE race condition on fifo
t1400.190 sometimes fails or even hangs because of the way it uses fifos. Our goal is to interactively read and write lines from update-ref, so we have two fifos, in and out. We open a descriptor connected to "in" and redirect output to that, so that update-ref does not see EOF as it would if we opened and closed it for each "echo" call. But we don't do the same for the output. This leads to a race where our "read response <out" has not yet opened the fifo, but update-ref tries to write to it and gets SIGPIPE. This can result in the test failing, or worse, hanging as we wait forever for somebody to write to the pipe. This is the same proble we fixed in 4783e7ea83 (t0008: avoid SIGPIPE race condition on fifo, 2013-07-12), and we can fix it the same way, by opening a second long-running descriptor. Before this patch, running: ./t1400-update-ref.sh --run=1,190 --stress failed or hung within a few dozen iterations. After it, I ran it for several hundred without problems. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-branch.txt')
0 files changed, 0 insertions, 0 deletions