1
0
mirror of https://github.com/git/git.git synced 2024-09-28 04:10:41 +02:00

git-upload-pack: make sure we close unused pipe ends

Right now, we don't close the read end of the pipe when git-upload-pack
runs git-pack-object, so we hang forever (why don't we get SIGALRM?)
instead of dying with SIGPIPE if the latter dies, which seems to be the
norm if the client disconnects.

Thanks to Johannes Schindelin <Johannes.Schindelin@gmx.de> for
pointing out where this close() needed to go.

This patch has been tested on kernel.org for several weeks and appear
to resolve the problem of git-upload-pack processes hanging around
forever.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
(cherry picked from commit 465b3518a9)
This commit is contained in:
H. Peter Anvin 2007-03-27 16:45:06 -07:00 committed by Junio C Hamano
parent c2c6d9302a
commit 3ac53e0d13

View File

@ -119,6 +119,7 @@ static void create_pack_file(void)
int i;
struct rev_info revs;
close(lp_pipe[0]);
pack_pipe = fdopen(lp_pipe[1], "w");
if (create_full_pack)