From b78b66a97610449c115848c58b9b75b5abc60c8b Mon Sep 17 00:00:00 2001 From: naruse Date: Sat, 24 Oct 2015 18:21:39 +0000 Subject: use rlimit_nproc other than Windows git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_process.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/ruby/test_process.rb') diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 7345cc3b3c..2910ff8bd4 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -1596,11 +1596,13 @@ class TestProcess < Test::Unit::TestCase cmds = Array.new(min, cmd) exs = [Errno::ENOENT] exs << Errno::E2BIG if defined?(Errno::E2BIG) + opts = {[STDOUT, STDERR]=>File::NULL} + opts[:rlimit_nproc] = 128 if /mswin|mingw/ =~ RUBY_PLATFORM EnvUtil.suppress_warning do assert_raise(*exs, mesg) do begin loop do - Process.spawn(cmds.join(sep), [STDOUT, STDERR]=>File::NULL, rlimit_nproc: 1) + Process.spawn(cmds.join(sep), opts) min = [cmds.size, min].max cmds *= 100 end -- cgit v1.2.3