summaryrefslogtreecommitdiffabout
path: root/src
Side-by-side diff
Diffstat (limited to 'src') (more/less context) (show whitespace changes)
-rw-r--r--src/fastcgi.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fastcgi.cc b/src/fastcgi.cc
index 8b7668c..63b59f8 100644
--- a/src/fastcgi.cc
+++ b/src/fastcgi.cc
@@ -1,6 +1,7 @@
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <fastcgi.h>
#include "kingate/fastcgi.h"
#include "kingate/exception.h"
@@ -15,6 +16,9 @@ namespace kingate {
throw exception(CODEPOINT,"failed to FCGX_Init()");
_initialized = true;
}
+ if(!s) {
+ sock = FCGI_LISTENSOCK_FILENO;
+ }else{
sock = FCGX_OpenSocket(s,bl);
if(sock<0)
throw exception(CODEPOINT,"failed to FCGX_OpenSocket(");
@@ -23,6 +27,7 @@ namespace kingate {
if(chmod(s,0777)) // XXX: configurable.
throw exception(CODEPOINT,"failed to chmod()");
}
+ }
fcgi_socket::fcgi_socket(int s)
: sock(0) {
if(!_initialized) {