in chefctl/src/chefctl.rb [1019:1054]
def output_copier_thread
return nil if Chefctl::Config.quiet
output_t = Thread.new do
logf = File.open(@paths[:out], 'r')
logf.seek(0, IO::SEEK_END)
begin
loop do
sleep(0.1) unless copy_output(logf)
end
rescue RuntimeError => e
while copy_output(logf)
end
Chefctl.logger.debug("Stopped output copier: #{e}")
ensure
logf.close
end
end
sleep(0.1)
output_t
end