diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-09-29 22:36:08 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-09-29 22:36:08 -0400 |
commit | c85e2d09160e46d9bf38b711308708c8d13119d6 (patch) | |
tree | 8e22990c20f3551e87d96e15a0b5b05c6586cf38 /Annex/Concurrent.hs | |
parent | b8248cf826a69ca43d3fe462b6686407cb859c65 (diff) |
fix process and FD leak
Fix process and file descriptor leak that was exposed when git-annex was
built with ghc 8.2.1. Apparently ghc has changed its behavior of GC
of open file handles that are pipes to running processes. That
broke git-annex test on OSX due to running out of FDs.
Audited for all uses of Annex.new and made stopCoProcesses be called
once it's done with the state. Fixed several places that might have
leaked in other situations than running the test suite.
This commit was sponsored by Ewen McNeill.
Diffstat (limited to 'Annex/Concurrent.hs')
-rw-r--r-- | Annex/Concurrent.hs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/Annex/Concurrent.hs b/Annex/Concurrent.hs index 71a70fa5b..65acb0450 100644 --- a/Annex/Concurrent.hs +++ b/Annex/Concurrent.hs @@ -7,12 +7,9 @@ module Annex.Concurrent where -import Annex.Common import Annex -import Annex.CatFile -import Annex.CheckAttr -import Annex.HashObject -import Annex.CheckIgnore +import Annex.Common +import Annex.Action import qualified Annex.Queue import qualified Data.Map as M @@ -61,11 +58,3 @@ mergeState st = do uncurry addCleanup Annex.Queue.mergeFrom st' changeState $ \s -> s { errcounter = errcounter s + errcounter st' } - -{- Stops all long-running git query processes. -} -stopCoProcesses :: Annex () -stopCoProcesses = do - catFileStop - checkAttrStop - hashObjectStop - checkIgnoreStop |