1
0
mirror of https://github.com/git/git synced 2024-07-02 15:48:44 +00:00

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 <carenas@gmail.com>
Helped-by: Carlo Arenas <carenas@gmail.com>
Signed-off-by: Max Kirillov <max@max630.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Max Kirillov 2018-11-24 15:48:27 +02:00 committed by Junio C Hamano
parent 98cdfbb84a
commit 02818a98d7

View File

@ -486,6 +486,8 @@ static void run_service(const char **argv, int buffer_input)
if (buffer_input || gzipped_request || req_len >= 0)
cld.in = -1;
cld.git_cmd = 1;
cld.clean_on_exit = 1;
cld.wait_after_clean = 1;
if (start_command(&cld))
exit(1);