mirror of
https://github.com/nodejs/node.git
synced 2024-11-30 23:43:09 +01:00
6d92cc736d
PR-URL: https://github.com/nodejs/node/pull/46408 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
24 lines
607 B
JavaScript
24 lines
607 B
JavaScript
'use strict';
|
|
// Refs: https://github.com/nodejs/node/pull/5916
|
|
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
const spawn = require('child_process').spawn;
|
|
const net = require('net');
|
|
|
|
if (process.argv[2] === 'child') {
|
|
assert(process.stdin instanceof net.Socket);
|
|
return;
|
|
}
|
|
|
|
const proc = spawn(
|
|
process.execPath,
|
|
[__filename, 'child'],
|
|
{ stdio: 'ignore' },
|
|
);
|
|
// To double-check this test, set stdio to 'pipe' and uncomment the line below.
|
|
// proc.stderr.pipe(process.stderr);
|
|
proc.on('exit', common.mustCall(function(exitCode) {
|
|
assert.strictEqual(exitCode, 0);
|
|
}));
|