diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-02-17 14:30:18 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-02-17 14:30:18 -0400 |
commit | f3affee1f111886057a5cc3083b55bfafa50bae8 (patch) | |
tree | 8b534056de91505376f7a45a0622f58d2e9d3e54 /Annex | |
parent | 615053c624b357520ef01db60c58e60d848a44bd (diff) |
have onLocal stop any coprocesses, not only cat-file
I have not seen any other coprocesses being started, but let's avoid
problems if any do for whatever reason.
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Concurrent.hs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/Annex/Concurrent.hs b/Annex/Concurrent.hs index ee19d4766..71a70fa5b 100644 --- a/Annex/Concurrent.hs +++ b/Annex/Concurrent.hs @@ -56,14 +56,16 @@ dupState = do - Also closes various handles in it. -} mergeState :: AnnexState -> Annex () mergeState st = do - st' <- liftIO $ snd <$> run st closehandles + st' <- liftIO $ snd <$> run st stopCoProcesses forM_ (M.toList $ Annex.cleanup st') $ uncurry addCleanup Annex.Queue.mergeFrom st' changeState $ \s -> s { errcounter = errcounter s + errcounter st' } - where - closehandles = do - catFileStop - checkAttrStop - hashObjectStop - checkIgnoreStop + +{- Stops all long-running git query processes. -} +stopCoProcesses :: Annex () +stopCoProcesses = do + catFileStop + checkAttrStop + hashObjectStop + checkIgnoreStop |