Issue #5487 has been reported by William Morgan.

----------------------------------------
Bug #5487: popen3 + timeout regression in ruby 1.9
http://redmine.ruby-lang.org/issues/5487

Author: William Morgan
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: 1.9.2p290


Wrapping Open3.popen3 in a Timeout::timeout block used to work in Ruby 1.8, but doesn't work in 1.9:

w@masanjin:~$ cat timeout.rb
require 'timeout'
require 'open3'

Timeout::timeout(1) { Open3.popen3("sleep 100 && echo hi") { |i, o, e| e.read } }
w@masanjin:~$ /usr/bin/ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
w@masanjin:~$ /usr/bin/ruby timeout.rb 
/usr/lib/ruby/1.8/timeout.rb:60: execution expired (Timeout::Error)
	from /usr/lib/ruby/1.8/open3.rb:86:in `popen3'
	from timeout.rb:4
	from timeout.rb:4

w@masanjin:~$ ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]
w@masanjin:~$ ruby timeout.rb 
[sleeps forever]



-- 
http://redmine.ruby-lang.org