[前][次][番号順一覧][スレッド一覧]

ruby-changes:45419

From: nobu <ko1@a...>
Date: Thu, 2 Feb 2017 07:14:29 +0900 (JST)
Subject: [ruby-changes:45419] nobu:r57492 (trunk): test_queue.rb: fix portability

nobu	2017-02-02 07:14:22 +0900 (Thu, 02 Feb 2017)

  New Revision: 57492

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=57492

  Log:
    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.

  Modified files:
    trunk/test/thread/test_queue.rb
Index: test/thread/test_queue.rb
===================================================================
--- test/thread/test_queue.rb	(revision 57491)
+++ test/thread/test_queue.rb	(revision 57492)
@@ -549,14 +549,14 @@ class TestQueue < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/thread/test_queue.rb#L549
   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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]