aboutsummaryrefslogtreecommitdiff
path: root/Command/Watch.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-06-11 01:20:19 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-06-11 01:20:19 -0400
commit0b3e2bed783ade691baf60a4198aaa1034b28440 (patch)
treeb0709933e47c89dbb6518fc316584538874ccc57 /Command/Watch.hs
parentd5884388b09347835df599d8a0dcea77e6795c10 (diff)
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.
Diffstat (limited to 'Command/Watch.hs')
-rw-r--r--Command/Watch.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Command/Watch.hs b/Command/Watch.hs
index 480bd3ede..8b8e5578d 100644
--- a/Command/Watch.hs
+++ b/Command/Watch.hs
@@ -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 ()