mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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:
parent
cd6dcfb05b
commit
800ff52c17
1 changed files with 4 additions and 1 deletions
|
@ -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"}
|
||||
|
|
Loading…
Reference in a new issue