From: Sebastian Hungerecker Date: 2007-07-22T18:18:59+09:00 Subject: Re: IO.popen - continuous output Dan Zwell wrote: > file1: > #!/usr/bin/env ruby > 5.times {puts "hi"; sleep 0.5} > > file2: > #!/usr/bin/env ruby > IO.popen("./file1").each_line { |line| puts line } > > When running file2 (which should stream the output from file1), the > output is not streamed, but instead saved up until "file1" finishes > running and then dumped. That seems to be a buffering issue. If you set STDOUT.sync to true in file1, it will work as expected. -- NP: Explosions in the Sky - Welcome, Ghosts Ist so, weil ist so Bleibt so, weil war so