summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-03-14 22:23:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-03-14 22:23:20 (GMT)
commitd6857a831ca86c0ab0157722728696537700dad0 (patch)
tree465b880592aa35c001ce8a7957bfca112bd38cab /builtin
parent130b664e442767587638b3e807a6f543168239d7 (diff)
parentd1a13d3fcb252631361a961cb5e2bf10ed467cba (diff)
downloadgit-d6857a831ca86c0ab0157722728696537700dad0.zip
git-d6857a831ca86c0ab0157722728696537700dad0.tar.gz
git-d6857a831ca86c0ab0157722728696537700dad0.tar.bz2
Merge branch 'jk/push-deadlock-regression-fix'
"git push" had a handful of codepaths that could lead to a deadlock when unexpected error happened, which has been fixed. * jk/push-deadlock-regression-fix: send-pack: report signal death of pack-objects send-pack: read "unpack" status even on pack-objects failure send-pack: improve unpack-status error messages send-pack: use skip_prefix for parsing unpack status send-pack: extract parsing of "unpack" response receive-pack: fix deadlock when we cannot create tmpdir
Diffstat (limited to 'builtin')
-rw-r--r--builtin/receive-pack.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 9ed8fbb..f2c6953 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -1667,8 +1667,11 @@ static const char *unpack(int err_fd, struct shallow_info *si)
}
tmp_objdir = tmp_objdir_create();
- if (!tmp_objdir)
+ if (!tmp_objdir) {
+ if (err_fd > 0)
+ close(err_fd);
return "unable to create temporary object directory";
+ }
child.env = tmp_objdir_env(tmp_objdir);
/*