diff options
author | Jeff King <peff@peff.net> | 2016-04-19 18:50:17 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-20 13:33:53 -0700 |
commit | 3e8b06d09c48a46ad7fee761a58040a7b006a642 (patch) | |
tree | a62f59c61570ee1222398a5be85e6821ec124910 /compat/vcbuild/scripts | |
parent | run-command: teach async threads to ignore SIGPIPE (diff) | |
download | tgif-3e8b06d09c48a46ad7fee761a58040a7b006a642.tar.xz |
send-pack: isolate sigpipe in demuxer thread
If we get an error from pack-objects, we may exit
send_pack() early, before reading the server's status
response. In such a case, we may racily see SIGPIPE from our
async demuxer (which is trying to write that status back to
us), and we'd prefer to continue pushing the error up the
call stack, rather than taking down the whole process with
signal death.
This is safe to do because our demuxer just calls
recv_sideband, whose data writes are all done with
write_or_die(), which will notice SIGPIPE.
We do also write sideband 2 to stderr, and we would no
longer die on SIGPIPE there (if it were piped in the first
place, and if the piped program went away). But that's
probably a good thing, as it likewise should not abort the
push process at all (neither immediately by signal, nor
eventually by reporting failure back to the main thread).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/vcbuild/scripts')
0 files changed, 0 insertions, 0 deletions