diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-04-06 20:18:57 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-04-06 20:20:52 -0400 |
commit | 466a2c31be0f662c3c93dd54867d2a969e01714e (patch) | |
tree | 8ec40ec574bf752ce4fa79bc94f9ca805e594641 /Assistant/Install.hs | |
parent | af8e2e2f1db15d6cd5951f8a5ba7eafda93df519 (diff) |
bring back --quiet filtering of stdout and stderr, with deadlock fixed
I don't quite understand the cause of the deadlock. It only occurred
when git-annex-shell transferinfo was being spawned over ssh to feed
download transfer progress back. And if I removed this line from
feedprogressback, the deadlock didn't occur:
bytes <- readSV v
The problem was not a leaked FD, as far as I could see. So what was it?
I don't know.
Anyway, this is a nice clean implementation, that avoids the deadlock.
Just fork off the async threads to handle filtering the stdout and stderr,
and let them clean up their handles whenever they decide to exit.
I've verified that the handles do get promptly closed, although a little
later than I would expect. Presumably that "little later" is what
was making waiting on the threads deadlock.
Despite the late exit, the last line of stdout and stderr appears where
I'd want it to, so I guess this is ok..
Diffstat (limited to 'Assistant/Install.hs')
0 files changed, 0 insertions, 0 deletions