From abd94a7f5a50f43c797a11b53549ae48fff667c3 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 10 Oct 2016 03:43:44 +0200 Subject: add node_modules to address #4364 --- node_modules/flagged-respawn/lib/respawn.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 node_modules/flagged-respawn/lib/respawn.js (limited to 'node_modules/flagged-respawn/lib/respawn.js') diff --git a/node_modules/flagged-respawn/lib/respawn.js b/node_modules/flagged-respawn/lib/respawn.js new file mode 100644 index 000000000..086585300 --- /dev/null +++ b/node_modules/flagged-respawn/lib/respawn.js @@ -0,0 +1,15 @@ +const spawn = require('child_process').spawn; + +module.exports = function (argv) { + var child = spawn(argv[0], argv.slice(1), { stdio: 'inherit' }); + child.on('exit', function (code, signal) { + process.on('exit', function () { + if (signal) { + process.kill(process.pid, signal); + } else { + process.exit(code); + } + }); + }); + return child; +}; -- cgit v1.2.3