diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-31 07:18:43 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-31 07:18:43 +0000 |
| commit | dc04417e71037f2f4126aa3e15841c117f5e5af9 (patch) | |
| tree | 318038f6aeac865e67eaafb937a83985a22cf87f /test | |
| parent | 314e43adfc43bf906d8b37453f434b210d908a37 (diff) | |
| download | ruby-dc04417e71037f2f4126aa3e15841c117f5e5af9.tar.gz ruby-dc04417e71037f2f4126aa3e15841c117f5e5af9.tar.xz ruby-dc04417e71037f2f4126aa3e15841c117f5e5af9.zip | |
* test/ruby/test_process.rb (TestProcess#test_rlimit_nofile):
setrlimit may fail with EINVAL.
reported by MIYAMUKO Katsuyuki. [ruby-dev:29174]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@10649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_process.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/ruby/test_process.rb b/test/ruby/test_process.rb index dc04c60f4..93eb871ed 100644 --- a/test/ruby/test_process.rb +++ b/test/ruby/test_process.rb @@ -23,7 +23,11 @@ class TestProcess < Test::Unit::TestCase return unless rlimit_exist? pid = fork { cur_nofile, max_nofile = Process.getrlimit(Process::RLIMIT_NOFILE) - Process.setrlimit(Process::RLIMIT_NOFILE, 0, max_nofile) + begin + Process.setrlimit(Process::RLIMIT_NOFILE, 0, max_nofile) + rescue Errno::EINVAL + exit 0 + end begin IO.pipe rescue Errno::EMFILE |
