summaryrefslogtreecommitdiff
path: root/src/server/exec/pgf-fcgi.hs
blob: 5fe43e0d425b1d9fa4ad27ce58b5b437a5aae88a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE CPP #-}
import Control.Concurrent(forkIO)
import Network.FastCGI(runFastCGI,runFastCGIConcurrent')

import PGFService(cgiMain,newPGFCache,stderrToFile,logFile)

main = do stderrToFile logFile
          fcgiMain =<< newPGFCache Nothing


fcgiMain cache =
#ifndef mingw32_HOST_OS
          runFastCGIConcurrent' forkIO 100 (cgiMain cache)
#else
          runFastCGI (cgiMain cache)
#endif