Tim Hunter wrote:
> Possibly the command is writing to stderr instead of stdout. What 
> happens when you do this?
> 
> ./mycommand foo >mycommand.stdout 2>mycommand.stderr

pretty sure thats not it.  Running that gives me no output at all.

I tried a super simple scenario.

test.rb:
  #!/usr/local/bin/ruby
  IO.popen('./foo.rb') { |f| puts f.gets }

foo.rb:
  #!/usr/local/bin/ruby
  10.times do |i|
    puts i
    sleep 0.5
  end

When I run "./foo.rb" I get a slow count to 10, as expected.

When I run "./test.rb" I get a 5 second pause followed by a "0", then it 
exits.

So it looks the block passed to popen isnt even getting called until the 
command that it invokes exits.  Then the variable passed into the block 
is the entire output of that command?
-- 
Posted via http://www.ruby-forum.com/.