summaryrefslogtreecommitdiff
path: root/src/server/exec/pgf-fcgi.hs
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2013-12-17 15:55:14 +0000
committerhallgren <hallgren@chalmers.se>2013-12-17 15:55:14 +0000
commite9e919e6e3bd92ef6c30181817dd9c6e571011de (patch)
treec975b2711f1de6c8117fdec2627847cad5e6617f /src/server/exec/pgf-fcgi.hs
parentc8b8ca33c65720663908f9a9d3516534f6300114 (diff)
src/server/gf-server.cabal: compile it as a common library + executables
Diffstat (limited to 'src/server/exec/pgf-fcgi.hs')
-rw-r--r--src/server/exec/pgf-fcgi.hs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/server/exec/pgf-fcgi.hs b/src/server/exec/pgf-fcgi.hs
new file mode 100644
index 000000000..3b5b0b3cf
--- /dev/null
+++ b/src/server/exec/pgf-fcgi.hs
@@ -0,0 +1,16 @@
+{-# LANGUAGE CPP #-}
+import Control.Concurrent(forkIO)
+import Network.FastCGI(runFastCGI,runFastCGIConcurrent')
+
+import PGFService(cgiMain,newPGFCache,stderrToFile,logFile)
+import System.IO
+main = do stderrToFile logFile
+ fcgiMain =<< newPGFCache
+
+
+fcgiMain cache =
+#ifndef mingw32_HOST_OS
+ runFastCGIConcurrent' forkIO 100 (cgiMain cache)
+#else
+ runFastCGI (cgiMain cache)
+#endif