diff options
author | Joey Hess <joey@kitenet.net> | 2014-07-14 15:44:44 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-07-14 15:52:00 -0400 |
commit | 28c3b4fdda5809b18f7a046a1923ab2fb5c1b157 (patch) | |
tree | 13d674c1c4d60c4604699af6738ffaf9e0598e18 /Assistant.hs | |
parent | c43e4de3495d8574e731d756c9c6e468d028b01e (diff) |
Windows: Fix locking issue that prevented the webapp starting (since 5.20140707).
Reversion introduced in 89c188fac37c20c40b0a9dabeb35403cfa4e4f52.
The locking code was wrong; the webapp re-ran itself, saw pid was locked,
and so didn't start!
Diffstat (limited to 'Assistant.hs')
-rw-r--r-- | Assistant.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Assistant.hs b/Assistant.hs index 03864c420..c1f480f9d 100644 --- a/Assistant.hs +++ b/Assistant.hs @@ -102,7 +102,6 @@ startDaemon assistant foreground startdelay cannotrun listenhost startbrowser = createAnnexDirectory (parentDir logfile) ifM (liftIO $ isNothing <$> getEnv flag) ( liftIO $ withFile devNull WriteMode $ \nullh -> do - Utility.Daemon.lockPidFile pidfile when (not foreground) $ debugM desc $ "logging to " ++ logfile loghandle <- openLog logfile @@ -116,7 +115,7 @@ startDaemon assistant foreground startdelay cannotrun listenhost startbrowser = , std_err = UseHandle loghandle } exitWith =<< waitForProcess pid - , start id $ do + , start (Utility.Daemon.foreground (Just pidfile)) $ case startbrowser of Nothing -> Nothing Just a -> Just $ a Nothing Nothing |