set cwd rarher than changing current process directory
This is not actually used in git-annex though.
This commit is contained in:
parent
6eadcab5bf
commit
4de3351c5c
1 changed files with 1 additions and 2 deletions
|
@ -52,14 +52,13 @@ daemonize cmd params openlogfd pidfile changedirectory a = do
|
|||
nullfd <- openFd "/dev/null" ReadOnly Nothing defaultFileFlags
|
||||
redir nullfd stdInput
|
||||
redirLog =<< openlogfd
|
||||
when changedirectory $
|
||||
setCurrentDirectory "/"
|
||||
environ <- getEnvironment
|
||||
_ <- createProcess $
|
||||
(proc cmd (toCommand params))
|
||||
{ env = Just (addEntry envvar cmd environ)
|
||||
, create_group = True
|
||||
, new_session = True
|
||||
, cwd = if changedirectory then Just "/" else Nothing
|
||||
}
|
||||
return ()
|
||||
where
|
||||
|
|
Loading…
Reference in a new issue