diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-10 00:32:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-05-10 00:32:58 +0000 |
commit | 2acad06421e760a358aac01e22bd83268e532174 (patch) | |
tree | 96e6f71e660b3fdc4243c3fbd75c7b0e883b05ab /test | |
parent | 08928bb528e2133e733606439765e91a7a5c5e6f (diff) | |
download | ruby-2acad06421e760a358aac01e22bd83268e532174.tar.gz |
test_thread.rb: run with default handler
* test/ruby/test_thread.rb (test_thread_timer_and_interrupt): run
with default handler.
* test/ruby/test_thread.rb (test_thread_{join,value}_in_trap):
ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_thread.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb index 62e0a2ee4b..8da774e664 100644 --- a/test/ruby/test_thread.rb +++ b/test/ruby/test_thread.rb @@ -730,7 +730,7 @@ _eom bug5757 = '[ruby-dev:44985]' t0 = Time.now.to_f pid = nil - cmd = 'r,=IO.pipe; Thread.start {Thread.pass until Thread.main.stop?; puts; STDOUT.flush}; r.read' + cmd = 'Signal.trap(:INT, "DEFAULT"); r,=IO.pipe; Thread.start {Thread.pass until Thread.main.stop?; puts; STDOUT.flush}; r.read' opt = {} opt[:new_pgroup] = true if /mswin|mingw/ =~ RUBY_PLATFORM s, _err = EnvUtil.invoke_ruby(['-e', cmd], "", true, true, opt) do |in_p, out_p, err_p, cpid| @@ -750,6 +750,7 @@ _eom def test_thread_join_in_trap assert_separately [], <<-'EOS' + Signal.trap(:INT, "DEFAULT") t0 = Thread.current assert_nothing_raised{ t = Thread.new {Thread.pass until t0.stop?; Process.kill(:INT, $$)} @@ -765,6 +766,7 @@ _eom def test_thread_value_in_trap assert_separately [], <<-'EOS' + Signal.trap(:INT, "DEFAULT") t0 = Thread.current t = Thread.new {Thread.pass until t0.stop?; Process.kill(:INT, $$); :normal_end} |