Fix zombie process that occurred when switching between repository views in the webapp.
This commit is contained in:
parent
a83dca0a58
commit
1f39aef893
3 changed files with 10 additions and 2 deletions
|
@ -61,8 +61,12 @@ getSwitchToRepositoryR 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. -}
|
||||
startAssistant :: FilePath -> IO ()
|
||||
startAssistant repo = do
|
||||
program <- readProgramFile
|
||||
void $ forkIO $ void $ createProcess $
|
||||
(proc program ["assistant"]) { cwd = Just repo }
|
||||
(_, _, _, pid) <-
|
||||
createProcess $
|
||||
(proc program ["assistant"]) { cwd = Just repo }
|
||||
void $ checkSuccessProcess pid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue