11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_cirequire('../common'); 31cb0ef41Sopenharmony_ci 41cb0ef41Sopenharmony_ciconst spawn = require('child_process').spawn; 51cb0ef41Sopenharmony_ci 61cb0ef41Sopenharmony_ciconst child = spawn(process.execPath, 71cb0ef41Sopenharmony_ci [ '--inspect', 'no-such-script.js' ], 81cb0ef41Sopenharmony_ci { 'stdio': 'inherit' }); 91cb0ef41Sopenharmony_ci 101cb0ef41Sopenharmony_cifunction signalHandler() { 111cb0ef41Sopenharmony_ci child.kill(); 121cb0ef41Sopenharmony_ci process.exit(1); 131cb0ef41Sopenharmony_ci} 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_ciprocess.on('SIGINT', signalHandler); 161cb0ef41Sopenharmony_ciprocess.on('SIGTERM', signalHandler); 17