summaryrefslogtreecommitdiffstats
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
commit4202879723a9916af9c44bca00b804d2c8f979b0 (patch)
tree033c1c0e07670578f8d5a07dc2278dc696c4f5f5 /sample
parent162e12c34e24bc6fe05bda2ade5f6d07f38dd719 (diff)
downloadruby-4202879723a9916af9c44bca00b804d2c8f979b0.tar.gz
ruby-4202879723a9916af9c44bca00b804d2c8f979b0.tar.xz
ruby-4202879723a9916af9c44bca00b804d2c8f979b0.zip
wait signal arrival 10sec.
git-svn-id: http://svn.ruby-lang.org/repos/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 532b485c8..3f24bd071 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"}