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.
This commit is contained in:
Joey Hess 2017-02-17 14:30:18 -04:00
parent d074532aff
commit 00464fbed7
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
2 changed files with 12 additions and 10 deletions

View file

@ -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