11cb0ef41Sopenharmony_ciimport { mustCall } from '../common/index.mjs'; 21cb0ef41Sopenharmony_ciimport { fork } from 'child_process'; 31cb0ef41Sopenharmony_ci 41cb0ef41Sopenharmony_ciif (process.argv[2] === 'child') { 51cb0ef41Sopenharmony_ci process.disconnect(); 61cb0ef41Sopenharmony_ci} else { 71cb0ef41Sopenharmony_ci const child = fork(new URL(import.meta.url), ['child']); 81cb0ef41Sopenharmony_ci 91cb0ef41Sopenharmony_ci child.on('disconnect', mustCall()); 101cb0ef41Sopenharmony_ci child.once('exit', mustCall()); 111cb0ef41Sopenharmony_ci} 12