Skip to content

Commit 02818a9

Browse files
max630gitster
authored andcommitted
http-backend: enable cleaning up forked upload/receive-pack on exit
If http-backend dies because of errors, started upload-pack or receive-pack are not killed and waited, but rather stay running for some time until they exit because of closed stdin. It may be undesirable in working environment, and it also causes occasional failure of t5562, because the processes keep opened act.err, and sometimes write there errors after next test started using the file. Fix by enabling cleaning of the command at http-backed exit. Reported-by: Carlo Arenas <[email protected]> Helped-by: Carlo Arenas <[email protected]> Signed-off-by: Max Kirillov <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 98cdfbb commit 02818a9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

http-backend.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,8 @@ static void run_service(const char **argv, int buffer_input)
486486
if (buffer_input || gzipped_request || req_len >= 0)
487487
cld.in = -1;
488488
cld.git_cmd = 1;
489+
cld.clean_on_exit = 1;
490+
cld.wait_after_clean = 1;
489491
if (start_command(&cld))
490492
exit(1);
491493

0 commit comments

Comments
 (0)