hdaemonize 0.4 → 0.4.1
raw patch · 2 files changed
+14/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ System.Posix.Daemonize: fatalError :: String -> IO a
Files
- System/Posix/Daemonize.hs +13/−2
- hdaemonize.cabal +1/−1
System/Posix/Daemonize.hs view
@@ -3,8 +3,9 @@ -- * Simple daemonization daemonize, -- * Building system services- serviced, CreateDaemon(..), simpleDaemon- + serviced, CreateDaemon(..), simpleDaemon,+ -- * Intradaemon utilities + fatalError -- * An example -- -- | Here is an example of a full program which writes a message to@@ -314,3 +315,13 @@ pass :: IO () pass = return ()++-- | When you encounter an error where the only sane way to handle it+-- is to write an error to the log and die messily, use fatalError.+-- This is a good candidate for things like not being able to find+-- configuration files on startup.+fatalError :: String -> IO a+fatalError msg = do+ syslog Error $ "Terminating from error: " ++ msg+ exitImmediately (ExitFailure 1)+ undefined -- You will never reach this; it's there to make the type checker happy
hdaemonize.cabal view
@@ -1,5 +1,5 @@ Name: hdaemonize-Version: 0.4+Version: 0.4.1 Cabal-Version: >= 1.6 License: BSD3 License-file: LICENSE