aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 ba3aeb9825..8f1ecde398 100644
--- a/test/ruby/test_process.rb
+++ b/test/ruby/test_process.rb
@@ -57,11 +57,13 @@ class TestProcess < Test::Unit::TestCase
def test_rlimit_nofile
return unless rlimit_exist?
+ limit = /openbsd/ =~ RUBY_PLATFORM ? 1 : 0
+ # if limit=0, this test freeze pn OpenBSD
with_tmpchdir {
write_file 's', <<-"End"
result = 1
begin
- Process.setrlimit(Process::RLIMIT_NOFILE, 0)
+ Process.setrlimit(Process::RLIMIT_NOFILE, limit)
rescue Errno::EINVAL
result = 0
end