summaryrefslogtreecommitdiff
path: root/Utility/Daemon.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Utility/Daemon.hs')
-rw-r--r--Utility/Daemon.hs11
1 files changed, 1 insertions, 10 deletions
diff --git a/Utility/Daemon.hs b/Utility/Daemon.hs
index 185ea3e68..ff13a3b8a 100644
--- a/Utility/Daemon.hs
+++ b/Utility/Daemon.hs
@@ -8,6 +8,7 @@
module Utility.Daemon where
import Common
+import Utility.LogFile
import System.Posix
@@ -40,16 +41,6 @@ daemonize logfd pidfile changedirectory a = do
out
out = exitImmediately ExitSuccess
-redirLog :: Fd -> IO ()
-redirLog logfd = do
- mapM_ (redir logfd) [stdOutput, stdError]
- closeFd logfd
-
-redir :: Fd -> Fd -> IO ()
-redir newh h = do
- closeFd h
- void $ dupTo newh h
-
{- Locks the pid file, with an exclusive, non-blocking lock.
- Writes the pid to the file, fully atomically.
- Fails if the pid file is already locked by another process. -}