diff --git a/Mighty.hs b/Mighty.hs
--- a/Mighty.hs
+++ b/Mighty.hs
@@ -4,7 +4,7 @@
 
 import Config
 import Control.Concurrent
-import Control.Exception (catch, handle, SomeException)
+import Control.Exception (onException, handle, SomeException)
 import Control.Monad
 import qualified Data.ByteString.Char8 as BS
 import FileCGIApp
@@ -13,7 +13,6 @@
 import Network.Wai.Application.Classic
 import Network.Wai.Handler.Warp
 import Network.Wai.Logger.Prefork
-import Prelude hiding (catch)
 import Route
 import System.Environment
 import System.Exit
@@ -80,6 +79,7 @@
 
 single :: Option -> RouteDB -> Socket -> LogType -> IO ()
 single opt route s logtype = do
+    ignoreSigChild
     lgr <- logInit FromSocket logtype
     getInfo <- fileCacheInit
     runSettingsSocket setting s $ fileCgiApp (spec lgr getInfo) route
@@ -107,13 +107,17 @@
     return cids
   where
     workers = opt_worker_processes opt
-    initHandler sig func = installHandler sig func Nothing
-    ignoreSigChild = initHandler sigCHLD Ignore
     terminateHandler cids = Catch $ do
         mapM_ terminateChild cids
         exitImmediately ExitSuccess
-    terminateChild cid = signalProcess sigTERM cid `catch` ignore
+    terminateChild cid = signalProcess sigTERM cid `onException` ignore
 
+initHandler :: Signal -> Handler -> IO Handler
+initHandler sig func = installHandler sig func Nothing
+
+ignoreSigChild :: IO Handler
+ignoreSigChild = initHandler sigCHLD Ignore
+
 ----------------------------------------------------------------
 
 setGroupUser :: Option -> IO ()
@@ -144,8 +148,8 @@
 
 ----------------------------------------------------------------
 
-ignore :: SomeException -> IO ()
-ignore = const $ return ()
+ignore :: IO ()
+ignore = return ()
 
 printStdout :: SomeException -> IO ()
 printStdout e = print e
diff --git a/Types.hs b/Types.hs
--- a/Types.hs
+++ b/Types.hs
@@ -15,4 +15,4 @@
 programName = "Mighttpd"
 
 programVersion :: String
-programVersion = "2.3.3"
+programVersion = "2.3.4"
diff --git a/mighttpd2.cabal b/mighttpd2.cabal
--- a/mighttpd2.cabal
+++ b/mighttpd2.cabal
@@ -1,5 +1,5 @@
 Name:                   mighttpd2
-Version:                2.3.3
+Version:                2.3.4
 Author:                 Kazu Yamamoto <kazu@iij.ad.jp>
 Maintainer:             Kazu Yamamoto <kazu@iij.ad.jp>
 License:                BSD3
