diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-19 07:47:12 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-19 07:47:12 +0000 |
commit | 4835230fef0005666e89fd1e2da5ad03ddb78315 (patch) | |
tree | ea99eaee3a04a5710f8a10900f76d637fb0069f1 /test/ruby/test_io.rb | |
parent | c4561c29348c357f50162cdd5c16d8b98d8cd0fa (diff) |
test/ruby: reap zombies
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index e42ace1952..6c62695d6c 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -922,9 +922,14 @@ class TestIO < Test::Unit::TestCase args = ['-e', '$>.write($<.read)'] if args.empty? ruby = EnvUtil.rubybin f = IO.popen([ruby] + args, 'r+') + pid = f.pid yield(f) ensure f.close unless !f || f.closed? + begin + Process.wait(pid) + rescue Errno::ECHILD, Errno::ESRCH + end end def test_try_convert |