Fixes a bug in the last release that caused rsync and possibly other commands to hang at the end of a file transfer.

Stderr reader blocks waiting for all stderr, and so blocks the process ever
exiting.

I tried several ways to get around this, but no success yet. For now,
disable the stderr reader entirely.
This commit is contained in:
Joey Hess 2015-04-06 17:11:51 -04:00
parent 88458211a2
commit 0a89d55269
2 changed files with 15 additions and 6 deletions

View file

@ -165,10 +165,10 @@ type ProgressParser = String -> (Maybe BytesProcessed, String)
-}
commandMeter :: ProgressParser -> OutputHandler -> MeterUpdate -> FilePath -> [CommandParam] -> IO Bool
commandMeter progressparser oh meterupdate cmd params = catchBoolIO $
withOEHandles createProcessSuccess p $ \(outh, errh) -> do
ep <- async $ handlestderr errh
withHandle StdoutHandle createProcessSuccess p $ \outh -> do
-- ep <- async $ handlestderr errh
op <- async $ feedprogress zeroBytesProcessed [] outh
wait ep
-- wait ep
wait op
where
p = proc cmd (toCommand params)
@ -204,12 +204,12 @@ demeterCommand oh cmd params = demeterCommandEnv oh cmd params Nothing
demeterCommandEnv :: OutputHandler -> FilePath -> [CommandParam] -> Maybe [(String, String)] -> IO Bool
demeterCommandEnv oh cmd params environ = catchBoolIO $
withOEHandles createProcessSuccess p $ \(outh, errh) -> do
ep <- async $ avoidProgress True errh $ stderrHandler oh
withHandle StdoutHandle createProcessSuccess p $ \outh -> do
-- ep <- async $ avoidProgress True errh $ stderrHandler oh
op <- async $ avoidProgress True outh $ \l ->
unless (quietMode oh) $
putStrLn l
wait ep
-- wait ep
wait op
return True
where

9
debian/changelog vendored
View file

@ -1,3 +1,12 @@
git-annex (5.20150407) UNRELEASED; urgency=medium
* Fixes a bug in the last release that caused rsync and possibly
other commands to hang at the end of a file transfer.
(--quiet is back to not blocking progress displays until
that code can be fixed properly.)
-- Joey Hess <id@joeyh.name> Mon, 06 Apr 2015 17:12:10 -0400
git-annex (5.20150406) unstable; urgency=medium
* Prevent git-ls-files from double-expanding wildcards when an