summaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-06-09 14:44:18 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-06-09 14:44:18 -0400
commit7f8c59418442bc0224b1b88f49e75458d190a64f (patch)
tree3c52c63ac4f816d751d8c5cf56098b7e90b255bb /Utility
parentb29694b2e61d5f0ca36a3709eb7f76fdf3a739a5 (diff)
Ignore setsid failures.
Diffstat (limited to 'Utility')
-rw-r--r--Utility/Daemon.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Utility/Daemon.hs b/Utility/Daemon.hs
index 39c42bf53..23d18d2b6 100644
--- a/Utility/Daemon.hs
+++ b/Utility/Daemon.hs
@@ -39,7 +39,7 @@ daemonize logfd pidfile changedirectory a = do
checkalreadyrunning f = maybe noop (const alreadyRunning)
=<< checkDaemon f
child1 = do
- _ <- createSession
+ _ <- tryIO createSession
_ <- forkProcess child2
out
child2 = do
@@ -59,7 +59,7 @@ daemonize logfd pidfile changedirectory a = do
foreground :: Fd -> Maybe FilePath -> IO () -> IO ()
foreground logfd pidfile a = do
maybe noop lockPidFile pidfile
- _ <- createSession
+ _ <- tryIO createSession
redirLog logfd
a
exitImmediately ExitSuccess