summaryrefslogtreecommitdiff
path: root/upload-pack.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-03-27 23:45:06 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-03-28 00:05:12 (GMT)
commit465b3518a9ad5080a4b652ef35fb13c61a93e7a4 (patch)
treea0874d5850747ce0f51b3332f58edfd4b67bcf0d /upload-pack.c
parent4621af371686f5c787c172c285562ad997281821 (diff)
downloadgit-465b3518a9ad5080a4b652ef35fb13c61a93e7a4.zip
git-465b3518a9ad5080a4b652ef35fb13c61a93e7a4.tar.gz
git-465b3518a9ad5080a4b652ef35fb13c61a93e7a4.tar.bz2
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>
Diffstat (limited to 'upload-pack.c')
-rw-r--r--upload-pack.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/upload-pack.c b/upload-pack.c
index 498bf50..d3a09e7 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)