ruby-changes:20685
From: naruse <ko1@a...>
Date: Fri, 29 Jul 2011 16:20:34 +0900 (JST)
Subject: [ruby-changes:20685] naruse:r32731 (trunk): Use setrlimit(NOFILE,1) on OpenBSD.
naruse 2011-07-29 16:17:35 +0900 (Fri, 29 Jul 2011) New Revision: 32731 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32731 Log: Use setrlimit(NOFILE,1) on OpenBSD. Because on OpenBSD it freezes if limit=0. Modified files: trunk/test/ruby/test_process.rb Index: test/ruby/test_process.rb =================================================================== --- test/ruby/test_process.rb (revision 32730) +++ test/ruby/test_process.rb (revision 32731) @@ -57,11 +57,13 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/