explicitly wait for a git process

Eliminate a zombie that was only cleaned up by the later zombie cleanup
code.

This is still not ideal, it would be cleaner if it used conduit or
something, and if the thread gets killed before waiting, it won't stop
the process.

Only remaining zombies are in CmdLine.Seek
This commit is contained in:
Joey Hess 2020-09-25 10:58:30 -04:00
parent b5b1aeacba
commit ca454c47f2
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 25 additions and 22 deletions

View file

@ -532,8 +532,9 @@ cachedRemoteData u = do
let combinedata d uk = finishCheck uk >>= \case
Nothing -> return d
Just k -> return $ addKey k d
v <- lift $ foldM combinedata emptyKeyInfo
=<< loggedKeysFor' u
(ks, cleanup) <- lift $ loggedKeysFor' u
v <- lift $ foldM combinedata emptyKeyInfo ks
liftIO $ void cleanup
put s { repoData = M.insert u v (repoData s) }
return v