mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
3e29e0126e
PR-URL: https://github.com/nodejs/node/pull/17193 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
17 lines
366 B
JavaScript
17 lines
366 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() {
|
|
child.kill();
|
|
process.exit(1);
|
|
}
|
|
|
|
process.on('SIGINT', signalHandler);
|
|
process.on('SIGTERM', signalHandler);
|