* test/ruby/test_io.rb: handled rlimit value same as r52277
[Bug #11852][ruby-dev:49446] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
268da52347
commit
a7f6b862f0
@ -1,3 +1,8 @@
|
|||||||
|
Mon Dec 21 12:15:32 2015 Kimura Wataru <kimuraw@i.nifty.jp>
|
||||||
|
|
||||||
|
* test/ruby/test_io.rb: handled rlimit value same as r52277
|
||||||
|
[Bug #11852][ruby-dev:49446]
|
||||||
|
|
||||||
Mon Dec 21 10:21:22 2015 Ilya Vassilevsky <vassilevsky@gmail.com>
|
Mon Dec 21 10:21:22 2015 Ilya Vassilevsky <vassilevsky@gmail.com>
|
||||||
|
|
||||||
* lib/net/http.rb (open_timeout): update default value in RDoc
|
* lib/net/http.rb (open_timeout): update default value in RDoc
|
||||||
|
@ -1094,7 +1094,10 @@ class TestIO < Test::Unit::TestCase
|
|||||||
args = ['-e', '$>.write($<.read)'] if args.empty?
|
args = ['-e', '$>.write($<.read)'] if args.empty?
|
||||||
ruby = EnvUtil.rubybin
|
ruby = EnvUtil.rubybin
|
||||||
opts = {}
|
opts = {}
|
||||||
opts[:rlimit_nproc] = 1024 if defined?(Process::RLIMIT_NPROC)
|
if defined?(Process::RLIMIT_NPROC)
|
||||||
|
lim = Process.getrlimit(Process::RLIMIT_NPROC)[1]
|
||||||
|
opts[:rlimit_nproc] = [lim, 1024].min
|
||||||
|
end
|
||||||
f = IO.popen([ruby] + args, 'r+', opts)
|
f = IO.popen([ruby] + args, 'r+', opts)
|
||||||
pid = f.pid
|
pid = f.pid
|
||||||
yield(f)
|
yield(f)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user