summaryrefslogtreecommitdiff
path: root/Assistant.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant.hs')
-rw-r--r--Assistant.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Assistant.hs b/Assistant.hs
index b61270613..2a11741b4 100644
--- a/Assistant.hs
+++ b/Assistant.hs
@@ -73,6 +73,7 @@ import Assistant.Threads.Merger
import Assistant.Threads.SanityChecker
import qualified Utility.Daemon
import Utility.LogFile
+import Utility.ThreadScheduler
import Control.Concurrent
@@ -99,8 +100,8 @@ startDaemon assistant foreground
_ <- forkIO $ mergeThread st
_ <- forkIO $ daemonStatusThread st dstatus
_ <- forkIO $ sanityCheckerThread st dstatus changechan
- -- Does not return.
- watchThread st dstatus changechan
+ _ <- forkIO $ watchThread st dstatus changechan
+ waitForTermination
stopDaemon :: Annex ()
stopDaemon = liftIO . Utility.Daemon.stopDaemon =<< fromRepo gitAnnexPidFile