Skip to content

Commit 8b59935

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 898f807 commit 8b59935

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

send-pack.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ static int pack_objects(int fd, struct ref *refs, struct oid_array *extra, struc
8585
po.in = -1;
8686
po.out = args->stateless_rpc ? -1 : fd;
8787
po.git_cmd = 1;
88+
po.clean_on_exit = 1;
8889
if (start_command(&po))
8990
die_errno("git pack-objects failed");
9091

0 commit comments

Comments
 (0)