ara.t.howard wrote:
> the general concepts are:
> 
> IO.popen cmd, 'r+' do |pipe|
>   pipe.sync = true ### you can do this once

Except that doesn't work. If the subprocess doesn't flush its output, 
setting sync to true won't change anything. I tested with this:

IO.popen("ruby -e '10.times{puts rand;sleep 1}'") do |pipe|
   pipe.sync = true
   while str = pipe.gets
     puts str
   end
end

and I get the output in one big block after 10 seconds. Does open3/open4 
change that? Somehow I doubt it.

Daniel