summaryrefslogtreecommitdiff
path: root/send-pack.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2020-11-21 00:29:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-21 21:55:17 (GMT)
commit8b59935114d9dafd737a7674ccf3787e7ffc61c9 (patch)
tree7afad32f7dc50052e4fe45d01a8b7f1d94b55730 /send-pack.c
parent898f80736c75878acc02dc55672317fcc0e0a5a6 (diff)
downloadgit-8b59935114d9dafd737a7674ccf3787e7ffc61c9.zip
git-8b59935114d9dafd737a7674ccf3787e7ffc61c9.tar.gz
git-8b59935114d9dafd737a7674ccf3787e7ffc61c9.tar.bz2
send-pack: kill pack-objects helper on signal or exit
We spawn an external pack-objects process to actually send objects to the remote side. If we are killed by a signal during this process, the pack-objects will keep running and complete the push, which may surprise the user. We should take it down when we go down. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'send-pack.c')
-rw-r--r--send-pack.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/send-pack.c b/send-pack.c
index c969807..2b3d15b 100644
--- a/send-pack.c
+++ b/send-pack.c
@@ -85,6 +85,7 @@ static int pack_objects(int fd, struct ref *refs, struct oid_array *extra, struc
po.in = -1;
po.out = args->stateless_rpc ? -1 : fd;
po.git_cmd = 1;
+ po.clean_on_exit = 1;
if (start_command(&po))
die_errno("git pack-objects failed");