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

ruby-changes:50604

From: ko1 <ko1@a...>
Date: Thu, 15 Mar 2018 12:55:38 +0900 (JST)
Subject: [ruby-changes:50604] ko1:r62754 (trunk): use SIGUSR2 to debug.

ko1	2018-03-15 12:55:33 +0900 (Thu, 15 Mar 2018)

  New Revision: 62754

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

  Log:
    use SIGUSR2 to debug.
    
    * test/ruby/test_io.rb: use SIGUSR2 instead of SIGUSR1 to confirm
      unknown SIGUSR1 exception. On parallel testing, sometime
      (1 per some days) SIGUSR1 exception. This fix will make clear which
      signal is a suspect.
    
      http://ci.rvm.jp/results/trunk-test@ruby-sky3/643893

  Modified files:
    trunk/test/ruby/test_io.rb
Index: test/ruby/test_io.rb
===================================================================
--- test/ruby/test_io.rb	(revision 62753)
+++ test/ruby/test_io.rb	(revision 62754)
@@ -84,12 +84,12 @@ class TestIO < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L84
     }
   end
 
-  def trapping_usr1
+  def trapping_usr2
     @usr1_rcvd  = 0
-    trap(:USR1) { @usr1_rcvd += 1 }
+    trap(:USR2) { @usr1_rcvd += 1 }
     yield
   ensure
-    trap(:USR1, "DEFAULT")
+    trap(:USR2, "DEFAULT")
   end
 
   def test_pipe
@@ -865,13 +865,13 @@ class TestIO < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_io.rb#L865
         rescue Errno::EBADF
           skip "nonblocking IO for pipe is not implemented"
         end
-        trapping_usr1 do
+        trapping_usr2 do
           nr = 30
           begin
             pid = fork do
               s1.close
               IO.select([s2])
-              Process.kill(:USR1, Process.ppid)
+              Process.kill(:USR2, Process.ppid)
               buf = String.new(capacity: 16384)
               nil while s2.read(16384, buf)
             end

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

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