From 72d2d9b204568b3683c29dea0ae794d3a524f2ee Mon Sep 17 00:00:00 2001 From: hallgren Date: Fri, 26 Nov 2010 14:30:51 +0000 Subject: Split pgf-server into pgf-fcgi and pgf-http. The dependency on the fastcgi package made pgf-server difficult to compile, so it is now split into - pgf-fgci (main module in pgf-fcgi.hs), which is built only if fastcgi is already installed or if you turn on the fastcgi flag (e.g. by doing 'cabal install -f fastcgi'). - pgf-http (main module in pgf-http.hs) which is always built (and hopefully has no problematic dependencies.) The modules FastCGIUtils and PGFService no longer depend on fastcgi. --- src/server/pgf-fcgi.hs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/server/pgf-fcgi.hs (limited to 'src/server/pgf-fcgi.hs') diff --git a/src/server/pgf-fcgi.hs b/src/server/pgf-fcgi.hs new file mode 100644 index 000000000..547f263c3 --- /dev/null +++ b/src/server/pgf-fcgi.hs @@ -0,0 +1,16 @@ +{-# LANGUAGE CPP #-} +import Control.Concurrent(forkIO) +import Network.FastCGI(runFastCGI,runFastCGIConcurrent') + +import PGFService(cgiMain,newPGFCache,stderrToFile,logFile) + +main = do stderrToFile logFile + fcgiMain =<< newPGFCache + + +fcgiMain cache = +#ifndef mingw32_HOST_OS + runFastCGIConcurrent' forkIO 100 (cgiMain cache) +#else + runFastCGI (cgiMain cache) +#endif -- cgit v1.2.3