summaryrefslogtreecommitdiff
path: root/CmdLine.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-10-02 11:16:34 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-10-02 11:16:34 -0400
commit49f21dd9ba4819aedf04ebbc0c12fafdb3dc8ab5 (patch)
tree4cb1d7f7a1b04493726db6e5e0e87dacbbda0daa /CmdLine.hs
parent1e6b7e901d47142a99ab4e6608f6307c01bc085e (diff)
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.
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index 4ccd2c2c2..0ee0c6adb 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -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