From 800ff52c17e0036a91bfc074db51e4222d0c7b8f Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 13 Feb 2008 13:20:12 +0000 Subject: wait signal arrival 10sec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- sample/test.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sample/test.rb') diff --git a/sample/test.rb b/sample/test.rb index 532b485c8c..3f24bd071a 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -1674,7 +1674,10 @@ if defined? Process.kill $x = 0 trap "SIGINT", Proc.new{|sig| $x = 2} Process.kill "SIGINT", $$ - sleep 0.1 + 100.times { + sleep 0.1 + break if $x != 0 + } test_ok($x == 2) trap "SIGINT", Proc.new{raise "Interrupt"} -- cgit v1.2.3