From fb128ef26f66f48612c962a853b1fa211ccf8bc6 Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 6 Feb 2009 11:36:23 +0000 Subject: [PATCH] no need to restore rlimit in child process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_process.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index 436ddd640a..23cb4e6112 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -58,10 +58,9 @@ class TestProcess < Test::Unit::TestCase 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 @@ class TestProcess < Test::Unit::TestCase result = 0 end end - Process.setrlimit(Process::RLIMIT_NOFILE, cur_nofile, max_nofile) exit result End pid = spawn RUBY, "s"