packages feed

mighttpd2 2.8.2 → 2.8.3

raw patch · 4 files changed

+20/−8 lines, 4 filesdep ~http-conduit

Dependency ranges changed: http-conduit

Files

Mighty.hs view
@@ -6,6 +6,7 @@ import Control.Applicative import Control.Concurrent import Control.Exception+import qualified Control.Exception as E (catch) import Control.Monad import qualified Data.ByteString.Char8 as BS import Data.Conduit.Network@@ -22,8 +23,7 @@ import Network.Wai.Handler.Warp import Network.Wai.Logger import Network.Wai.Logger.Prefork-import Prelude hiding (catch)-import Process+import Process (findChildren, PsResult, dummyResult) import Report import Route import Signal@@ -133,7 +133,7 @@ masterMainLoop :: Reporter -> ProcessID -> IO () masterMainLoop rpt myid = do     threadDelay 10000000-    cs <- findChildren myid+    cs <- findChildren myid `E.catch` handler     if null cs then do -- FIXME serverStatus st == Retiring         report rpt "Master Mighty retired"         finReporter rpt@@ -141,6 +141,9 @@         exitSuccess       else         masterMainLoop rpt myid+  where+    handler :: SomeException -> IO [PsResult]+    handler _ = return [dummyResult]  slaveMainLoop :: Reporter -> Stater -> Logger -> IO () slaveMainLoop rpt stt lgr = do@@ -158,7 +161,7 @@ ----------------------------------------------------------------  reportDo :: Reporter -> IO () -> IO ()-reportDo rpt act = act `catch` warpHandler rpt+reportDo rpt act = act `E.catch` warpHandler rpt  warpHandler :: Reporter -> SomeException -> IO () warpHandler rpt e = throwIO e `catches` handlers@@ -373,6 +376,7 @@ listenSocket' :: AddrInfo -> IO Socket listenSocket' addr = bracketOnError setup cleanup $ \sock -> do     setSocketOption sock ReuseAddr 1+    setSocketOption sock NoDelay 1     bindSocket sock (addrAddress addr)     listen sock 2048     return sock
Process.hs view
@@ -1,6 +1,11 @@ {-# LANGUAGE OverloadedStrings #-} -module Process (getMightyPid, findChildren) where+module Process (+    getMightyPid+  , findChildren+  , dummyResult+  , PsResult(..)+  ) where  import Control.Applicative import Data.ByteString.Char8 (ByteString)@@ -22,6 +27,9 @@   , ppid :: ProcessID   , command :: ByteString   } deriving (Eq, Show)++dummyResult :: PsResult+dummyResult = PsResult "" 0 0 ""  toPsResult :: [ByteString] -> PsResult toPsResult (a:b:c:_:_:_:_:h:_) = PsResult {
mighttpd2.cabal view
@@ -1,5 +1,5 @@ Name:                   mighttpd2-Version:                2.8.2+Version:                2.8.3 Author:                 Kazu Yamamoto <kazu@iij.ad.jp> Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp> License:                BSD3@@ -27,7 +27,7 @@                       , deepseq                       , directory                       , filepath-                      , http-conduit+                      , http-conduit >= 1.8.2.1                       , http-date                       , http-types                       , io-choice
mightyctl.hs view
@@ -1,7 +1,7 @@ module Main where  import Data.List-import Process+import Process (getMightyPid) import Signal import System.Environment import System.Exit