11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../common'); 31cb0ef41Sopenharmony_ciconst assert = require('assert'); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ciconst spawn = require('child_process').spawn; 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ciif (process.argv[2] === 'child') { 81cb0ef41Sopenharmony_ci process.send('hahah'); 91cb0ef41Sopenharmony_ci return; 101cb0ef41Sopenharmony_ci} 111cb0ef41Sopenharmony_ci 121cb0ef41Sopenharmony_ciconst proc = spawn(process.execPath, [__filename, 'child'], { 131cb0ef41Sopenharmony_ci stdio: ['inherit', 'ipc', 'inherit'] 141cb0ef41Sopenharmony_ci}); 151cb0ef41Sopenharmony_ci 161cb0ef41Sopenharmony_ciproc.on('exit', common.mustCall(function(code) { 171cb0ef41Sopenharmony_ci assert.strictEqual(code, 0); 181cb0ef41Sopenharmony_ci})); 19