Another approach to zombies problem (set SIGCHLD handler to SIG_IGN)
authorunc0rr
Wed, 27 May 2009 18:13:06 +0000
changeset 2129 8664554d5547
parent 2128 903fdb9f44b0
child 2130 708758635955
Another approach to zombies problem (set SIGCHLD handler to SIG_IGN)
gameServer/OfficialServer/DBInteraction.hs
gameServer/hedgewars-server.hs
--- a/gameServer/OfficialServer/DBInteraction.hs	Wed May 27 15:55:14 2009 +0000
+++ b/gameServer/OfficialServer/DBInteraction.hs	Wed May 27 18:13:06 2009 +0000
@@ -75,7 +75,7 @@
 		Control.Exception.handle (\e -> warningM "Database" (show e) >> return accountsCache) $ 
 			bracket
 				(createProcess (proc "./OfficialServer/extdbinterface" []) {std_in = CreatePipe, std_out = CreatePipe})
-				(\(_, _, _, processHandle) -> getProcessExitCode processHandle >> return (accountsCache))
+				(\(_, _, _, processHandle) -> return accountsCache)
 				(\(Just hIn, Just hOut, _, _) -> do
 				hSetBuffering hIn LineBuffering
 				hSetBuffering hOut LineBuffering
--- a/gameServer/hedgewars-server.hs	Wed May 27 15:55:14 2009 +0000
+++ b/gameServer/hedgewars-server.hs	Wed May 27 18:13:06 2009 +0000
@@ -28,6 +28,7 @@
 main = withSocketsDo $ do
 #if !defined(mingw32_HOST_OS)
 	installHandler sigPIPE Ignore Nothing;
+	installHandler sigCHLD Ignore Nothing;
 #endif
 
 	setupLoggers