wait signal arrival 10sec.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-02-13 13:20:12 +00:00
parent cd6dcfb05b
commit 800ff52c17

View File

@ -1674,7 +1674,10 @@ if defined? Process.kill
$x = 0 $x = 0
trap "SIGINT", Proc.new{|sig| $x = 2} trap "SIGINT", Proc.new{|sig| $x = 2}
Process.kill "SIGINT", $$ Process.kill "SIGINT", $$
sleep 0.1 100.times {
sleep 0.1
break if $x != 0
}
test_ok($x == 2) test_ok($x == 2)
trap "SIGINT", Proc.new{raise "Interrupt"} trap "SIGINT", Proc.new{raise "Interrupt"}