summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Nosek <root@localdomain.pl>2013-02-03 14:08:05 +0100
committerGrzegorz Nosek <root@localdomain.pl>2013-02-03 14:14:09 +0100
commitd4c32ed0330c44f4edc5355112cafc4e1dc3aaad (patch)
treef7b0fdd2cd4d15f80a470a2c4a649c36ea2224da
parent8aae1f5bf8d135d78e53c054876e2c9dc86936b9 (diff)
downloadfcgiwrap-d4c32ed0330c44f4edc5355112cafc4e1dc3aaad.tar.xz
fcgiwrap-d4c32ed0330c44f4edc5355112cafc4e1dc3aaad.zip
Close FCGI socket before executing script
We do it in a rather violent way to avoid FCGI shutdown (the parent must keep the socket alive and working)
-rw-r--r--fcgiwrap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fcgiwrap.c b/fcgiwrap.c
index d128e12..b865295 100644
--- a/fcgiwrap.c
+++ b/fcgiwrap.c
@@ -531,6 +531,8 @@ static void handle_fcgi_request(void)
close(pipe_out[1]);
close(pipe_err[1]);
+ close(FCGI_fileno(FCGI_stdout));
+
signal(SIGCHLD, SIG_DFL);
signal(SIGPIPE, SIG_DFL);