summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CmdLine.hs5
-rw-r--r--Crypto.hs3
2 files changed, 4 insertions, 4 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index 0ee0c6adb..38d4754da 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -85,9 +85,7 @@ tryRun' :: Integer -> Annex.AnnexState -> [Annex Bool] -> IO ()
tryRun' errnum state (a:as) = do
result <- try $ Annex.run state $ do
AnnexQueue.flushWhenFull
- r <- a
- liftIO Git.reap
- return r
+ a
case result of
Left err -> do
Annex.eval state $ do
@@ -106,4 +104,5 @@ startup = return True
shutdown :: Annex Bool
shutdown = do
saveState
+ liftIO Git.reap -- zombies from long-running git processes
return True
diff --git a/Crypto.hs b/Crypto.hs
index d789b4455..9b2d73f28 100644
--- a/Crypto.hs
+++ b/Crypto.hs
@@ -218,7 +218,7 @@ gpgCipherHandle params c a b = do
params' <- gpgParams $ passphrase ++ params
(pid, fromh, toh) <- hPipeBoth "gpg" params'
- _ <- forkProcess $ do
+ pid2 <- forkProcess $ do
L.hPut toh =<< a
hClose toh
exitSuccess
@@ -227,6 +227,7 @@ gpgCipherHandle params c a b = do
-- cleanup
forceSuccess pid
+ _ <- getProcessStatus True False pid2
closeFd frompipe
return ret