L
Lucas Nussbaum
Hi,
I ran into a problem demonstrated by the following code :
#!/usr/bin/ruby
require 'thread'
Thread::new {
while true do
puts "before read MOTD"
str = IO.read("/etc/motd")
puts "after read MOTD"
puts "before read UPTIME"
str = IO.read("/proc/uptime")
puts "after read UPTIME"
end
}
while true do
end
Ruby hangs on IO.read("/proc/uptime").
Note that it works with linux 2.4 (tested : 2.4.27) but not linux 2.6
(tested : 2.6.9)
It only fails with files on the proc filesystem.
Any ideas ?
Thanks,
I ran into a problem demonstrated by the following code :
#!/usr/bin/ruby
require 'thread'
Thread::new {
while true do
puts "before read MOTD"
str = IO.read("/etc/motd")
puts "after read MOTD"
puts "before read UPTIME"
str = IO.read("/proc/uptime")
puts "after read UPTIME"
end
}
while true do
end
Ruby hangs on IO.read("/proc/uptime").
Note that it works with linux 2.4 (tested : 2.4.27) but not linux 2.6
(tested : 2.6.9)
It only fails with files on the proc filesystem.
Any ideas ?
Thanks,