From 8b59935114d9dafd737a7674ccf3787e7ffc61c9 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Fri, 20 Nov 2020 19:29:21 -0500 Subject: 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 Signed-off-by: Junio C Hamano --- send-pack.c | 1 + 1 file changed, 1 insertion(+) diff --git a/send-pack.c b/send-pack.c index c9698070fc..2b3d15be5a 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"); -- cgit v1.2.3