diff options
author | 2015-04-06 17:11:51 -0400 | |
---|---|---|
committer | 2015-04-06 17:12:38 -0400 | |
commit | e7ea63548b6b33c14f94ec1a2c7c08f2b205b83d (patch) | |
tree | bd75779e8f4e168a877ec2303af4a9bba89ada56 | |
parent | 22ee5d7373a88fc3b1e532fdf406aa22153050e3 (diff) |
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.
-rw-r--r-- | Utility/Metered.hs | 12 | ||||
-rw-r--r-- | debian/changelog | 9 |
2 files changed, 15 insertions, 6 deletions
diff --git a/Utility/Metered.hs b/Utility/Metered.hs index 54f038f81..9a0b726a7 100644 --- a/Utility/Metered.hs +++ b/Utility/Metered.hs @@ -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 diff --git a/debian/changelog b/debian/changelog index ae501555a..b39b18177 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 |