mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 07:27:22 +01:00
10bc673123
This commit adds tests for several known issues. Refs: https://github.com/nodejs/node/issues/1901 Refs: https://github.com/nodejs/node/issues/728 Refs: https://github.com/nodejs/node/issues/4778 Refs: https://github.com/nodejs/node/issues/947 Refs: https://github.com/nodejs/node/issues/2734 PR-URL: https://github.com/nodejs/node/pull/5653 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
24 lines
646 B
JavaScript
24 lines
646 B
JavaScript
'use strict';
|
|
// Refs: https://github.com/nodejs/node/issues/947
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const cp = require('child_process');
|
|
|
|
if (process.argv[2] === 'child') {
|
|
process.on('message', common.mustCall((msg) => {
|
|
assert.strictEqual(msg, 'go');
|
|
console.log('logging should not cause a crash');
|
|
process.disconnect();
|
|
}));
|
|
} else {
|
|
const child = cp.fork(__filename, ['child'], {silent: true});
|
|
|
|
child.on('close', common.mustCall((exitCode, signal) => {
|
|
assert.strictEqual(exitCode, 0);
|
|
assert.strictEqual(signal, null);
|
|
}));
|
|
|
|
child.stdout.destroy();
|
|
child.send('go');
|
|
}
|