From: William Morgan Date: 2005-01-05T08:30:09+09:00 Subject: Re: Possible ruby bug involving threads and IO Excerpts from Lucas Nussbaum's mail of 4 Jan 2005 (EST): > Ruby hangs on IO.read("/proc/uptime"). This is probably the same issue described in: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/109668 http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/110600 The upshot is that certain files in /proc/ seem to hang on a select() call, which Ruby uses for I/O within threads. You can do an strace and watch the difference between doing this from within and from without a Thread. My workaround was something along the lines of: system "cat /proc/#{file} > #{tmpfile}" f = File.open tmpfile I don't know that there's a better solution. -- William