summaryrefslogtreecommitdiffabout
path: root/src/fastcgi.cc
authorMichael Krelin <hacker@klever.net>2020-10-07 22:52:19 (UTC)
committer Michael Krelin <hacker@klever.net>2020-10-07 22:52:19 (UTC)
commitc561689bf162fb22997bd88f4392f222f151c950 (patch) (unidiff)
treece4656e92c379f7089f4bb72a4b10d781b61211e /src/fastcgi.cc
parent3a4530372bc95d728dbddbac788f2c1f2d03a030 (diff)
downloadkingate-c561689bf162fb22997bd88f4392f222f151c950.zip
kingate-c561689bf162fb22997bd88f4392f222f151c950.tar.gz
kingate-c561689bf162fb22997bd88f4392f222f151c950.tar.bz2
missing includesHEADmaster
Diffstat (limited to 'src/fastcgi.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--src/fastcgi.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fastcgi.cc b/src/fastcgi.cc
index 8b7668c..5a6c081 100644
--- a/src/fastcgi.cc
+++ b/src/fastcgi.cc
@@ -1,27 +1,28 @@
1#include <unistd.h> 1#include <unistd.h>
2#include <sys/types.h> 2#include <sys/types.h>
3#include <sys/stat.h> 3#include <sys/stat.h>
4#include <cstring>
4#include "kingate/fastcgi.h" 5#include "kingate/fastcgi.h"
5#include "kingate/exception.h" 6#include "kingate/exception.h"
6 7
7namespace kingate { 8namespace kingate {
8 9
9 bool fcgi_socket::_initialized = false; 10 bool fcgi_socket::_initialized = false;
10 11
11 fcgi_socket::fcgi_socket(const char *s,int bl) 12 fcgi_socket::fcgi_socket(const char *s,int bl)
12 : sock(-1) { 13 : sock(-1) {
13 if(!_initialized) { 14 if(!_initialized) {
14 if( FCGX_Init() ) 15 if( FCGX_Init() )
15 throw exception(CODEPOINT,"failed to FCGX_Init()"); 16 throw exception(CODEPOINT,"failed to FCGX_Init()");
16 _initialized = true; 17 _initialized = true;
17 } 18 }
18 sock = FCGX_OpenSocket(s,bl); 19 sock = FCGX_OpenSocket(s,bl);
19 if(sock<0) 20 if(sock<0)
20 throw exception(CODEPOINT,"failed to FCGX_OpenSocket("); 21 throw exception(CODEPOINT,"failed to FCGX_OpenSocket(");
21 // TODO: check if there is a ':', not if it starts with ':' 22 // TODO: check if there is a ':', not if it starts with ':'
22 if(*s != ':') 23 if(*s != ':')
23 if(chmod(s,0777)) // XXX: configurable. 24 if(chmod(s,0777)) // XXX: configurable.
24 throw exception(CODEPOINT,"failed to chmod()"); 25 throw exception(CODEPOINT,"failed to chmod()");
25 } 26 }
26 fcgi_socket::fcgi_socket(int s) 27 fcgi_socket::fcgi_socket(int s)
27 : sock(0) { 28 : sock(0) {