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)
1094 1094
    args = ['-e', '$>.write($<.read)'] if args.empty?
1095 1095
    ruby = EnvUtil.rubybin
1096 1096
    opts = {}
1097
    opts[:rlimit_nproc] = 1024 if defined?(Process::RLIMIT_NPROC)
1097
    if defined?(Process::RLIMIT_NPROC)
1098
      lim = Process.getrlimit(Process::RLIMIT_NPROC)[1]
1099
      opts[:rlimit_nproc] = [lim, 1024].min
1100
    end
1098 1101
    f = IO.popen([ruby] + args, 'r+', opts)
1099 1102
    pid = f.pid
1100 1103
    yield(f)