# File lib/new_relic/agent/system_info.rb, line 214 def self.proc_try_read(path) return nil unless File.exist?(path) content = '' File.open(path) do |f| loop do begin content << f.read_nonblock(4096) rescue EOFError break rescue Errno::EWOULDBLOCK, Errno::EAGAIN content = nil break # don't select file handle, just give up end end end content end