summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-13 13:20:12 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-13 13:20:12 +0000
commit800ff52c17e0036a91bfc074db51e4222d0c7b8f (patch)
tree033c1c0e07670578f8d5a07dc2278dc696c4f5f5 /sample
parentcd6dcfb05b9d0fa429e943c6f8d656a77d145b82 (diff)
downloadruby-800ff52c17e0036a91bfc074db51e4222d0c7b8f.tar.gz
wait signal arrival 10sec.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
-rw-r--r--sample/test.rb5
1 files changed, 4 insertions, 1 deletions
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"}