aboutsummaryrefslogtreecommitdiffstats
path: root/test/thread
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-01 22:14:22 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-02-01 22:14:22 +0000
commitfa621bacf16d8344f55c82fc799474782f248502 (patch)
treed45156e2cbaa042089b34bb125bdd3d07c3ad0cb /test/thread
parent55efe47d0e01343c9f4e33f9336754daf255bd51 (diff)
downloadruby-fa621bacf16d8344f55c82fc799474782f248502.tar.gz
test_queue.rb: fix portability
* test/thread/test_queue.rb (test_queue_with_trap): fix portability. use SIGINT instead of SIGUSR2 which is supported on not all platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/thread')
-rw-r--r--test/thread/test_queue.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/thread/test_queue.rb b/test/thread/test_queue.rb
index 6122d9b87c..5ca6972ece 100644
--- a/test/thread/test_queue.rb
+++ b/test/thread/test_queue.rb
@@ -549,14 +549,14 @@ class TestQueue < Test::Unit::TestCase
end
def test_queue_with_trap
- assert_in_out_err([], <<-INPUT, %w(USR2 USR2 exit), [])
+ assert_in_out_err([], <<-INPUT, %w(INT INT exit), [])
q = Queue.new
- trap(:USR2){
- q.push 'USR2'
+ trap(:INT){
+ q.push 'INT'
}
Thread.new{
loop{
- Process.kill :USR2, $$
+ Process.kill :INT, $$
}
}
puts q.pop