summaryrefslogtreecommitdiff
path: root/test/ruby/test_thread.rb
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-10 14:25:23 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-05-10 14:25:23 +0000
commit4b1eca7ea0f9eb1ca527ffe79da924e454d4d55f (patch)
treee23d79109050fc3f75eb1645a94de516383d440b /test/ruby/test_thread.rb
parent65b76d92a4792b5960967b63f4c85dc6859bb807 (diff)
merge revision(s) r45891,r45893,r45895:
test_beginendblock.rb, test_signal.rb: run with default handler * test/ruby/test_beginendblock.rb (test_propagate_signaled): run with default handler. * test/ruby/test_signal.rb (test_hup_me): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@45905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_thread.rb')
-rw-r--r--test/ruby/test_thread.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index fedab8791e..cd84c125bc 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -726,7 +726,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|
@@ -746,6 +746,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, $$)}
@@ -761,6 +762,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}