Ignore setsid failures.
This commit is contained in:
parent
b6274745b4
commit
787d9e27ba
3 changed files with 10 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue