test('try to create an iterator with a blown stack', function (t) { // Reducing the stack size down from the default 984 for the child node // process makes it easier to trigger the bug condition. But making it too low // causes the child process to die for other reasons. var opts = { execArgv: ['--stack-size=128'] } var child = fork(path.join(__dirname, 'stack-blower.js'), ['run'], opts) t.plan(2) child.on('message', function (m) { t.ok(true, m) child.disconnect() }) child.on('exit', function (code, sig) { t.equal(code, 0, 'child exited normally') }) })
cp.disconnect(); cp.unref(); return resolve();
if (once.called) return true childs.forEach(child => { child.connected && child.disconnect() }) once.called = true child.connected && child.disconnect() }, 60000).unref()
case 'q': forked.disconnect(); forked.removeAllListeners(); forked.kill();