Project

General

Profile

Bug #11852 ยป patch-test-ruby-test_io.rb.diff

kimuraw (Wataru Kimura), 12/20/2015 12:11 PM

View differences:

test/ruby/test_io.rb (working copy)
args = ['-e', '$>.write($<.read)'] if args.empty?
ruby = EnvUtil.rubybin
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)
pid = f.pid
yield(f)
    (1-1/1)