From 38895e5c105f75cebd1dffc83667bbf04b0e22d0 Mon Sep 17 00:00:00 2001 From: ko1 Date: Thu, 15 Mar 2018 03:55:33 +0000 Subject: [PATCH] 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 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index f1a9453ae9..7d7e198334 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -84,12 +84,12 @@ class TestIO < Test::Unit::TestCase } 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 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