summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-06 11:36:23 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-06 11:36:23 +0000
commit1728c46e3cb0c057a516dfc0bf20d247b1037cfb (patch)
treec175644f755c60352e2f7625294d45d9fb1ba24c /test
parent6c648db89d9a6c92e789ec1b0a880ae1df5cd3c2 (diff)
downloadruby-1728c46e3cb0c057a516dfc0bf20d247b1037cfb.tar.gz
ruby-1728c46e3cb0c057a516dfc0bf20d247b1037cfb.tar.xz
ruby-1728c46e3cb0c057a516dfc0bf20d247b1037cfb.zip
no need to restore rlimit in child process.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_process.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb
index 436ddd640..23cb4e611 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"