From 8181b38ef6060103953ce464d03e9cfd75c45663 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 1 Aug 2012 16:29:38 -0400 Subject: write pid file even when running in foreground This prevents multiple runs of the assistant in the foreground, and lets --stop stop foregrounded runs too. The webapp firstrun case also now writes a pid file, once it's made the git repo to put it in. --- Assistant.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'Assistant.hs') diff --git a/Assistant.hs b/Assistant.hs index be84fab55..21414e721 100644 --- a/Assistant.hs +++ b/Assistant.hs @@ -129,6 +129,7 @@ startDaemon :: Bool -> Bool -> Maybe (Url -> FilePath -> IO ()) -> Annex () startDaemon assistant foreground webappwaiter | foreground = do showStart (if assistant then "assistant" else "watch") "." + liftIO . Utility.Daemon.lockPidFile =<< fromRepo gitAnnexPidFile go id | otherwise = do logfd <- liftIO . openLog =<< fromRepo gitAnnexLogFile -- cgit v1.2.3