about summary refs log tree commit homepage
path: root/test/test_server.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2018-12-08 17:33:51 +0000
committerEric Wong <e@80x24.org>2018-12-08 17:33:51 +0000
commit2ee9353fba7be5443db2ccdc3541586932ccf1f1 (patch)
treed3d39a754353c5078e468a219a289c2170d97614 /test/test_server.rb
parentdbadf731d06a79cdae7afd23f4c20fb8fbb9c07e (diff)
downloadyahns-2ee9353fba7be5443db2ccdc3541586932ccf1f1.tar.gz
Since we've required Ruby 2.0+ for a while, we can assume
descriptors are created with IO#close_on_exec=true and
avoid bloating our code with calls to it.
Diffstat (limited to 'test/test_server.rb')
-rw-r--r--test/test_server.rb3
1 files changed, 0 insertions, 3 deletions
diff --git a/test/test_server.rb b/test/test_server.rb
index a113b43..75e1857 100644
--- a/test/test_server.rb
+++ b/test/test_server.rb
@@ -182,7 +182,6 @@ class TestServer < Testcase
     tmpdir = yahns_mktmpdir
     sock = "#{tmpdir}/sock"
     unix_srv = UNIXServer.new(sock)
-    unix_srv.close_on_exec = true
     msgs = %w(ZZ zz)
     err = @err
     cfg = Yahns::Config.new
@@ -234,7 +233,6 @@ class TestServer < Testcase
     bpipe[0].close
     a = UNIXSocket.new(sock)
     b = UNIXSocket.new(sock)
-    b.close_on_exec = a.close_on_exec = true
     a.write("GET /sleep HTTP/1.0\r\n\r\n")
     r = IO.select([a], nil, nil, 4)
     assert r, "nothing ready"
@@ -681,7 +679,6 @@ class TestServer < Testcase
     assert_equal "INFO HIHI\n", re.read
 
     c = UNIXSocket.new(sock)
-    c.close_on_exec = true
     c.write "GET /\r\n\r\n"
     assert_equal c, c.wait(30)
     assert_equal "OK", c.read