summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-05-20 21:26:49 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-05-20 21:26:49 +0100
commit77ee1db9bb8c70dd0ed6a55472c7de9651fd43ff (patch)
tree3df7213e0e7bec421f689b9650413bf092ebf698
parentFix XML raw view to handle namespaces better, covering unit test (diff)
downloadproject2-1.1.2.tar.bz2
project2-1.1.2.tar.xz
project2-1.1.2.zip
Work around the fact that webapp-config [might] tear down and replace in its entirely the document root, leaving existing fcgi apps homelessproject2-1.1.2
-rw-r--r--project2/cgi/Jamfile.jam1
-rw-r--r--project2/cgi/p2webFCgi.cpp2
2 files changed, 3 insertions, 0 deletions
diff --git a/project2/cgi/Jamfile.jam b/project2/cgi/Jamfile.jam
index 5b8e5a5..14b681e 100644
--- a/project2/cgi/Jamfile.jam
+++ b/project2/cgi/Jamfile.jam
@@ -48,6 +48,7 @@ exe p2fcgi :
fcgi
:
<library>p2cgicommon
+ <library>boost_filesystem
<include>../../libmisc
;
diff --git a/project2/cgi/p2webFCgi.cpp b/project2/cgi/p2webFCgi.cpp
index 0551bf0..42a99bc 100644
--- a/project2/cgi/p2webFCgi.cpp
+++ b/project2/cgi/p2webFCgi.cpp
@@ -1,6 +1,7 @@
#include "FCgiIO.h"
#include "cgiAppEngine.h"
#include <boost/bind.hpp>
+#include <boost/filesystem/convenience.hpp>
time_t lastPeriodic = 0;
time_t periodicDelay = 600;
@@ -44,6 +45,7 @@ main(void)
while (FCGX_Accept_r(&request) == 0) {
alarm(0);
cgicc::FCgiIO IO(request);
+ boost::filesystem::current_path(boost::filesystem::initial_path());
app.process(IO, &IO, IO);
FCGX_Finish_r(&request);
Plugable::onAllComponents(boost::bind(&ComponentLoader::onIteration, _1));