diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-22 15:00:13 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-22 15:00:13 +0000 |
commit | b471c9d35abe9a9513f3751afa60ea959684a1fe (patch) | |
tree | 156c729150e3ddbad4ed3e245024e7ee81a032ba /test/ruby/test_io.rb | |
parent | 29a1905c7d8d8174c25d2c5de4c33bb5c2b55c61 (diff) | |
download | ruby-b471c9d35abe9a9513f3751afa60ea959684a1fe.tar.gz |
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
Diffstat (limited to 'test/ruby/test_io.rb')
-rw-r--r-- | test/ruby/test_io.rb | 2 |
1 files changed, 2 insertions, 0 deletions
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 |