mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 21:44:30 +02:00
Add rlimit_nproc to avoid to create many process [Bug #11613]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b5f2b5e1a2
commit
7b90b13755
1 changed files with 2 additions and 2 deletions
|
@ -1586,7 +1586,7 @@ class TestProcess < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_aspawn_too_long_path
|
def test_aspawn_too_long_path
|
||||||
bug4315 = '[ruby-core:34833]'
|
bug4315 = '[ruby-core:34833] #7904 [ruby-core:52628] #11613'
|
||||||
assert_fail_too_long_path(%w"echo |", bug4315)
|
assert_fail_too_long_path(%w"echo |", bug4315)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1600,7 +1600,7 @@ class TestProcess < Test::Unit::TestCase
|
||||||
assert_raise(*exs, mesg) do
|
assert_raise(*exs, mesg) do
|
||||||
begin
|
begin
|
||||||
loop do
|
loop do
|
||||||
Process.spawn(cmds.join(sep), [STDOUT, STDERR]=>File::NULL)
|
Process.spawn(cmds.join(sep), [STDOUT, STDERR]=>File::NULL, rlimit_nproc: 1)
|
||||||
min = [cmds.size, min].max
|
min = [cmds.size, min].max
|
||||||
cmds *= 100
|
cmds *= 100
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue