much better webapp startup of the assistant

This avoids forking another process, avoids polling, fixes a race,
and avoids a rare forkProcess thread hang that I saw once time
when starting the webapp.
This commit is contained in:
Joey Hess 2012-07-27 15:33:24 -04:00
parent bc5b151617
commit 02ec8ea012
5 changed files with 27 additions and 40 deletions

View file

@ -34,5 +34,5 @@ start :: Bool -> Bool -> Bool -> CommandStart
start assistant foreground stopdaemon = notBareRepo $ do
if stopdaemon
then stopDaemon
else startDaemon assistant foreground -- does not return
else startDaemon assistant foreground Nothing -- does not return
stop