11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ci// Refs: https://github.com/nodejs/node/pull/5916 31cb0ef41Sopenharmony_ci 41cb0ef41Sopenharmony_ciconst common = require('../common'); 51cb0ef41Sopenharmony_ciconst assert = require('assert'); 61cb0ef41Sopenharmony_ciconst spawn = require('child_process').spawn; 71cb0ef41Sopenharmony_ciconst net = require('net'); 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ciif (process.argv[2] === 'child') { 101cb0ef41Sopenharmony_ci assert(process.stdin instanceof net.Socket); 111cb0ef41Sopenharmony_ci return; 121cb0ef41Sopenharmony_ci} 131cb0ef41Sopenharmony_ci 141cb0ef41Sopenharmony_ciconst proc = spawn( 151cb0ef41Sopenharmony_ci process.execPath, 161cb0ef41Sopenharmony_ci [__filename, 'child'], 171cb0ef41Sopenharmony_ci { stdio: 'ignore' }, 181cb0ef41Sopenharmony_ci); 191cb0ef41Sopenharmony_ci// To double-check this test, set stdio to 'pipe' and uncomment the line below. 201cb0ef41Sopenharmony_ci// proc.stderr.pipe(process.stderr); 211cb0ef41Sopenharmony_ciproc.on('exit', common.mustCall(function(exitCode) { 221cb0ef41Sopenharmony_ci assert.strictEqual(exitCode, 0); 231cb0ef41Sopenharmony_ci})); 24