ruby-changes:10536
From: akr <ko1@a...>
Date: Fri, 6 Feb 2009 20:36:29 +0900 (JST)
Subject: [ruby-changes:10536] Ruby:r22090 (trunk): no need to restore rlimit in child process.
akr 2009-02-06 20:36:23 +0900 (Fri, 06 Feb 2009) New Revision: 22090 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22090 Log: no need to restore rlimit in child process. Modified files: trunk/test/ruby/test_process.rb Index: test/ruby/test_process.rb =================================================================== --- test/ruby/test_process.rb (revision 22089) +++ test/ruby/test_process.rb (revision 22090) @@ -58,10 +58,9 @@ return unless rlimit_exist? with_tmpchdir { write_file 's', <<-"End" - cur_nofile, max_nofile = Process.getrlimit(Process::RLIMIT_NOFILE) result = 1 begin - Process.setrlimit(Process::RLIMIT_NOFILE, 0, max_nofile) + Process.setrlimit(Process::RLIMIT_NOFILE, 0) rescue Errno::EINVAL result = 0 end @@ -72,7 +71,6 @@ result = 0 end end - Process.setrlimit(Process::RLIMIT_NOFILE, cur_nofile, max_nofile) exit result End pid = spawn RUBY, "s" -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/