node/test/inspector/test-inspector-stops-no-file.js
Eugene Ostroukhov 2f3865d5f5 inspector: check if connected before waiting
Fixes: https://github.com/nodejs/node/issues/10093
PR-URL: https://github.com/nodejs/node/pull/10094
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-12-06 14:28:20 -08:00

16 lines
370 B
JavaScript

'use strict';
require('../common');
const spawn = require('child_process').spawn;
const child = spawn(process.execPath,
[ '--inspect', 'no-such-script.js' ],
{ 'stdio': 'inherit' });
function signalHandler(value) {
child.kill();
process.exit(1);
}
process.on('SIGINT', signalHandler);
process.on('SIGTERM', signalHandler);