add a pid file
Writes pid to a file. Is supposed to take an exclusive lock, but that's not working, and it's too late for me to understand why.
This commit is contained in:
parent
d5884388b0
commit
0b3e2bed78
3 changed files with 37 additions and 16 deletions
|
@ -67,7 +67,8 @@ start foreground = notBareRepo $ withStateMVar $ \st -> do
|
|||
liftIO $ watch st
|
||||
else do
|
||||
logfd <- liftIO . openLog =<< fromRepo gitAnnexLogFile
|
||||
liftIO $ daemonize logfd False $ watch st
|
||||
pidfile <- fromRepo gitAnnexPidFile
|
||||
liftIO $ daemonize logfd (Just pidfile) False $ watch st
|
||||
stop
|
||||
|
||||
watch :: MVar Annex.AnnexState -> IO ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue