diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-11 01:18:59 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-11 01:18:59 +0000 |
commit | bdc36b360ea093e51cae4f983752bf077982fde0 (patch) | |
tree | d8ba1195a2185bee0b8e74696057cd8ff6a906f8 /test/ruby/test_thread.rb | |
parent | d95b13ead18a22cf7328064f9a29c7de72bf8103 (diff) |
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/test_thread.rb')
-rw-r--r-- | test/ruby/test_thread.rb | 7 |
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 |