From 0e3b5b68ca447cc6982b62a417ae0cf24e4810ba Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 22 Oct 2015 15:00:13 +0000 Subject: limit the number of FDs in a process for stress test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 2983826e9d..a5503cad8f 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1135,6 +1135,8 @@ class TestIO < Test::Unit::TestCase def test_dup_many ruby('-e', <<-'End') {|f| + lim = Process.getrlimit(Process::RLIMIT_NOFILE)[0] + Process.setrlimit(Process::RLIMIT_NOFILE, [lim, 1024].min) ok = 0 a = [] begin -- cgit v1.2.3