diff options
author | Jeff King <peff@peff.net> | 2012-02-23 05:04:34 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-02-23 11:10:10 -0800 |
commit | c34fe6304c0162c526b74e8639c94d8d026615fd (patch) | |
tree | 26dfc50b99bc6c82abd7c3ecaa9df38bb82bf519 /Documentation/RelNotes/1.5.5.3.txt | |
parent | remote-curl: Fix push status report when all branches fail (diff) | |
download | tgif-c34fe6304c0162c526b74e8639c94d8d026615fd.tar.xz |
disconnect from remote helpers more gently
When git spawns a remote helper program (like git-remote-http),
the last thing we do before closing the pipe to the child
process is to send a blank line, telling the helper that we
are done issuing commands. However, the helper may already
have exited, in which case the parent git process will
receive SIGPIPE and die.
In particular, this can happen with the remote-curl helper
when it encounters errors during a push. The helper reports
individual errors for each ref back to git-push, and then
exits with a non-zero exit code. Depending on the exact
timing of the write, the parent process may or may not
receive SIGPIPE.
This causes intermittent test failure in t5541.8, and is a
side effect of 5238cbf (remote-curl: Fix push status report
when all branches fail). Before that commit, remote-curl
would not send the final blank line to indicate that the
list of status lines was complete; it would just exit,
closing the pipe. The parent git-push would notice the
closed pipe while reading the status report and exit
immediately itself, propagating the failing exit code. But
post-5238cbf, remote-curl completes the status list before
exiting, git-push actually runs to completion, and then it
tries to cleanly disconnect the helper, leading to the
SIGPIPE race above.
This patch drops all error-checking when sending the final
"we are about to hang up" blank line to helpers. There is
nothing useful for the parent process to do about errors at
that point anyway, and certainly failing to send our "we are
done with commands" line to a helper that has already exited
is not a problem.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/RelNotes/1.5.5.3.txt')
0 files changed, 0 insertions, 0 deletions