summaryrefslogtreecommitdiff
path: root/exec_cmd.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2017-03-07 13:35:34 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-07 22:51:03 (GMT)
commit6cdad1f133475f2bff0dfe2fbe90c351df3ea61d (patch)
treeb0cf8770627b5157e38ca69b7e275ad204ab3ad6 /exec_cmd.h
parent454cb6bd52a4de614a3633e4f547af03d5c3b640 (diff)
downloadgit-6cdad1f133475f2bff0dfe2fbe90c351df3ea61d.zip
git-6cdad1f133475f2bff0dfe2fbe90c351df3ea61d.tar.gz
git-6cdad1f133475f2bff0dfe2fbe90c351df3ea61d.tar.bz2
receive-pack: fix deadlock when we cannot create tmpdir
The err_fd descriptor passed to the unpack() function is intended to be handed off to the child index-pack, and our async muxer will read until it gets EOF. However, if we encounter an error before handing off the descriptor, we must manually close(err_fd). Otherwise we will be waiting for our muxer to finish, while the muxer is waiting for EOF on err_fd. We fixed an identical deadlock already in 49ecfa13f (receive-pack: close sideband fd on early pack errors, 2013-04-19). But since then, the function grew a new early-return in 722ff7f87 (receive-pack: quarantine objects until pre-receive accepts, 2016-10-03), when we fail to create a temporary directory. This return needs the same treatment. Reported-by: Horst Schirmeier <horst@schirmeier.com> Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'exec_cmd.h')
0 files changed, 0 insertions, 0 deletions