about summary refs log tree commit homepage
path: root/test/test_output_buffering.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-10-25 23:01:01 +0000
committerEric Wong <normalperson@yhbt.net>2013-10-25 23:02:01 +0000
commit025a67afc97ce65d30bebd61bedf20066d1874c6 (patch)
treeaf21ac8c5c724813eae56b188161c24955ca6638 /test/test_output_buffering.rb
parent9bece9d13543743e2a0fdc6eab56c54098d4d0e6 (diff)
downloadyahns-025a67afc97ce65d30bebd61bedf20066d1874c6.tar.gz
We need to prevent FD leakage on Ruby 1.9.3
Diffstat (limited to 'test/test_output_buffering.rb')
-rw-r--r--test/test_output_buffering.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/test_output_buffering.rb b/test/test_output_buffering.rb
index afb23f8..ae9b449 100644
--- a/test/test_output_buffering.rb
+++ b/test/test_output_buffering.rb
@@ -77,8 +77,8 @@ class TestOutputBuffering < Testcase
       # HTTP/0.9
       c = get_tcp_client(host, port)
       c.write("GET /\r\n\r\n")
-      md5in = IO.pipe
-      md5out = IO.pipe
+      md5in = cloexec_pipe
+      md5out = cloexec_pipe
       sleep(delay) if delay
       md5pid = Process.spawn("md5sum", :in => md5in[0], :out => md5out[1])
       md5in[0].close