summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-03-14 15:23:20 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-03-14 15:23:20 -0700
commitd6857a831ca86c0ab0157722728696537700dad0 (patch)
tree465b880592aa35c001ce8a7957bfca112bd38cab /builtin
parentMerge branch 'js/travis-32bit-linux' (diff)
parentsend-pack: report signal death of pack-objects (diff)
downloadtgif-d6857a831ca86c0ab0157722728696537700dad0.tar.xz
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 9ed8fbbfad..f2c6953a39 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);
/*