diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-15 03:55:33 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-03-15 03:55:33 +0000 |
commit | 38895e5c105f75cebd1dffc83667bbf04b0e22d0 (patch) | |
tree | 5b446581003bb307b12a6c7bdba47d3383c4aa5f /test/ruby/test_io.rb | |
parent | 80e8b524d31a05957abb5c0383e365eb6a036edd (diff) | |
download | ruby-38895e5c105f75cebd1dffc83667bbf04b0e22d0.tar.gz |
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
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 10 |
1 files 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 |