about summary refs log tree commit homepage
path: root/test/server_helper.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2013-10-22 19:15:20 +0000
committerEric Wong <normalperson@yhbt.net>2013-10-22 19:19:27 +0000
commit60905d0cd626734d4b719eccf038cb7488b4ea12 (patch)
treeda5155122376f3bdc3985fd62c332bc4cdfc47dd /test/server_helper.rb
parent6aa8ec217362c058d37340a8ec314e68810e99a9 (diff)
downloadyahns-60905d0cd626734d4b719eccf038cb7488b4ea12.tar.gz
Leaking file descriptors may lead to out-of-FD situations in
an MT test suite.
Diffstat (limited to 'test/server_helper.rb')
-rw-r--r--test/server_helper.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/server_helper.rb b/test/server_helper.rb
index 89276b8..71cb9d3 100644
--- a/test/server_helper.rb
+++ b/test/server_helper.rb
@@ -50,6 +50,7 @@ module ServerHelper
   def get_tcp_client(host, port, tries = 500)
     begin
       c = TCPSocket.new(host, port)
+      c.close_on_exec = true
       return c
     rescue Errno::ECONNREFUSED
       raise if tries < 0