Processes using STDOUT will hang
Closed this issue · 2 comments
jqr commented
If a command produces output on STDOUT, eventually the pipe will fill and stop processing. I noticed this on some network server code that happened to use STDOUT. Removing calls to output seems to have fixed this.
Here's an example process, that should run forever, but stops abruptly when the log is about 57kb on my machine.
File.open('log', 'w') do |f|
x = 0
loop do
x += 1
f.write("#{Time.now.to_i} + #{x}\n")
f.fsync
puts "blah"
end
end
And the guard file.
guard 'process', :name => 'random', :command => 'ruby blah.rb' do
watch('Gemfile.lock')
end
mrkcor commented
Thanks for noticing this, I'm going to look into it
mrkcor commented
I've just release v1.0.2 which takes care of this issue :)