Windows: Fix startAssistant to not wait for ever for a non-daemonizing process

Seemed to fix several problems.
This commit is contained in:
Joey Hess 2014-02-13 12:55:27 -04:00
parent 8952ccec1b
commit 36e66997c6
2 changed files with 12 additions and 8 deletions

View file

@ -86,10 +86,13 @@ newAssistantUrl repo = do
threadDelay 100000 -- 1/10th of a second
a
{- Returns once the assistant has daemonized, but possibly before it's
- listening for web connections. -}
{- Does not wait for assistant to be listening for web connections.
-
- On windows, the assistant does not daemonize, which is why the forkIO is
- done.
-}
startAssistant :: FilePath -> IO ()
startAssistant repo = do
startAssistant repo = void $ forkIO $ do
program <- readProgramFile
(_, _, _, pid) <-
createProcess $