summaryrefslogtreecommitdiff
path: root/test/sequential/test-inspector-stops-no-file.js
blob: 9ec09fb15d93b4b328295ef13aa51ad531a32a16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
'use strict';
require('../common');

const spawn = require('child_process').spawn;

const child = spawn(process.execPath,
                    [ '--inspect', 'no-such-script.js' ],
                    { 'stdio': 'inherit' });

function signalHandler() {
  child.kill();
  process.exit(1);
}

process.on('SIGINT', signalHandler);
process.on('SIGTERM', signalHandler);