Contain the zombie hordes.a

Specifically, when using gpg, a zombie is forked for each file, so waiting
until shutdown to reap won't do.
This commit is contained in:
Joey Hess 2011-10-02 11:16:34 -04:00
parent 1e6b7e901d
commit 49f21dd9ba
2 changed files with 4 additions and 2 deletions

View file

@ -85,7 +85,9 @@ tryRun' :: Integer -> Annex.AnnexState -> [Annex Bool] -> IO ()
tryRun' errnum state (a:as) = do
result <- try $ Annex.run state $ do
AnnexQueue.flushWhenFull
a
r <- a
liftIO Git.reap
return r
case result of
Left err -> do
Annex.eval state $ do
@ -104,5 +106,4 @@ startup = return True
shutdown :: Annex Bool
shutdown = do
saveState
liftIO Git.reap
return True