Skip to content

Commit 3ac53e0

Browse files
H. Peter AnvinJunio C Hamano
authored andcommitted
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 <[email protected]> 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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]> (cherry picked from commit 465b351)
1 parent c2c6d93 commit 3ac53e0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

upload-pack.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ static void create_pack_file(void)
119119
int i;
120120
struct rev_info revs;
121121

122+
close(lp_pipe[0]);
122123
pack_pipe = fdopen(lp_pipe[1], "w");
123124

124125
if (create_full_pack)

0 commit comments

Comments
 (0)