aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-11 01:18:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-01-11 01:18:59 +0000
commitbdc36b360ea093e51cae4f983752bf077982fde0 (patch)
treed8ba1195a2185bee0b8e74696057cd8ff6a906f8 /test/ruby
parentd95b13ead18a22cf7328064f9a29c7de72bf8103 (diff)
downloadruby-bdc36b360ea093e51cae4f983752bf077982fde0.tar.gz
Ensure to terminate the child
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_thread.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/ruby/test_thread.rb b/test/ruby/test_thread.rb
index 51c0338595..f133126934 100644
--- a/test/ruby/test_thread.rb
+++ b/test/ruby/test_thread.rb
@@ -967,7 +967,12 @@ _eom
pid = cpid
t0 = Time.now.to_f
Process.kill(:SIGINT, pid)
- Timeout.timeout(10) { Process.wait(pid) }
+ begin
+ Timeout.timeout(10) { Process.wait(pid) }
+ rescue Timeout::Error
+ EnvUtil.terminate(pid)
+ raise
+ end
t1 = Time.now.to_f
[$?, t1 - t0, err_p.read]
end