summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-16 00:25:11 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-02-16 00:25:11 +0000
commit4f05bf852b2ccfd11dd6be7db9c54160711953ee (patch)
tree3a7f3acc629eada816c103d120ec59bf0c163406 /test
parentd23a588b22bd01d925d846a7f84542a116358799 (diff)
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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_process.rb4
1 files changed, 3 insertions, 1 deletions
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