From 77ee1db9bb8c70dd0ed6a55472c7de9651fd43ff Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 20 May 2015 21:26:49 +0100 Subject: Work around the fact that webapp-config [might] tear down and replace in its entirely the document root, leaving existing fcgi apps homeless --- project2/cgi/Jamfile.jam | 1 + project2/cgi/p2webFCgi.cpp | 2 ++ 2 files changed, 3 insertions(+) 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 : p2cgicommon + boost_filesystem ../../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 +#include 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)); -- cgit v1.2.3