summaryrefslogtreecommitdiff
path: root/lib/test/unit.rb
diff options
context:
space:
mode:
authorsorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-26 04:08:44 +0000
committersorah <sorah@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-12-26 04:08:44 +0000
commit48053fe6156f9387996930d5ae3e05a650b42b96 (patch)
treec26765f9f318dd861c8b5cab3c456d15c1effe7c /lib/test/unit.rb
parent7a9b2cad172060201d63118eeccec074eb4e44f3 (diff)
* lib/test/unit.rb: Avoid zombie processes on "--separate" option
added at r34121. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/test/unit.rb')
-rw-r--r--lib/test/unit.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/test/unit.rb b/lib/test/unit.rb
index 6068e295fb..9a85951b83 100644
--- a/lib/test/unit.rb
+++ b/lib/test/unit.rb
@@ -293,7 +293,9 @@ module Test
end
def close
- @io.close
+ begin
+ @io.close if @io.closed?
+ rescue IOError; end
self
end
@@ -301,6 +303,7 @@ module Test
return if @io.closed?
@quit_called = true
@io.puts "quit"
+ @io.close
end
def died(*additional)