mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
483 B
27 lines
483 B
include("mjsunit.js");
|
|
|
|
var N = 40;
|
|
var finished = false;
|
|
|
|
function spawn (i) {
|
|
var child = node.createChildProcess('python -c "print 500 * 1024 * \'C\'"');
|
|
var output = "";
|
|
|
|
child.addListener("output", function(chunk) {
|
|
if (chunk) output += chunk;
|
|
});
|
|
|
|
child.addListener("exit", function () {
|
|
//puts(output);
|
|
if (i < N)
|
|
spawn(i+1);
|
|
else
|
|
finished = true;
|
|
});
|
|
}
|
|
|
|
spawn(0);
|
|
|
|
process.addListener("exit", function () {
|
|
assertTrue(finished);
|
|
});
|
|
|