From 4f05bf852b2ccfd11dd6be7db9c54160711953ee Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 16 Feb 2012 00:25:11 +0000 Subject: merge revision(s) 32731,32734,32738: ------------------------------------------------------------------------ r32731 | naruse | 2011-07-29 16:17:35 +0900 (Fri, 29 Jul 2011) | 3 lines Use setrlimit(NOFILE,1) on OpenBSD. Because on OpenBSD it freezes if limit=0. ------------------------------------------------------------------------ git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@34639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_process.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 93eb85ea08..b37fbfebd6 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -59,9 +59,11 @@ class TestProcess < Test::Unit::TestCase return unless rlimit_exist? with_tmpchdir { write_file 's', <<-"End" + # if limit=0, this test freeze pn OpenBSD + limit = /openbsd/ =~ RUBY_PLATFORM ? 1 : 0 result = 1 begin - Process.setrlimit(Process::RLIMIT_NOFILE, 0) + Process.setrlimit(Process::RLIMIT_NOFILE, limit) rescue Errno::EINVAL result = 0 end -- cgit v1.2.3