diff options
authorH. Peter Anvin <>2007-03-27 23:45:06 (GMT)
committerJunio C Hamano <>2007-03-29 08:41:23 (GMT)
commit3ac53e0d13fa7483cce90eb6a1cfcdcbda5b8e35 (patch)
parentc2c6d9302a98ae4c4c76822a1c83551c039271a0 (diff)
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 <> for pointing out where this close() needed to go. This patch has been tested on for several weeks and appear to resolve the problem of git-upload-pack processes hanging around forever. Signed-off-by: H. Peter Anvin <> Signed-off-by: Junio C Hamano <> (cherry picked from commit 465b3518a9ad5080a4b652ef35fb13c61a93e7a4)
1 files changed, 1 insertions, 0 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 3648aae..044c33b 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -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)