From 5e7e3a919f8e7aa03650c9f5204decc0d03e6e49 Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Tue, 17 Mar 2009 20:43:50 +0100 Subject: Close child's pipe ends after dup2()ing them to the right places Thanks to Fenixk19 for the report and patch. --- fcgiwrap.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fcgiwrap.c') diff --git a/fcgiwrap.c b/fcgiwrap.c index eecd7cd..33e0e74 100644 --- a/fcgiwrap.c +++ b/fcgiwrap.c @@ -488,6 +488,10 @@ static void handle_fcgi_request() dup2(pipe_out[1], 1); dup2(pipe_err[1], 2); + close(pipe_in[0]); + close(pipe_out[1]); + close(pipe_err[1]); + signal(SIGCHLD, SIG_DFL); signal(SIGPIPE, SIG_DFL); execl(filename, filename, NULL); -- cgit v1.2.3