dotfiles/.vscode/extensions/saviorisdead.RustyCode-0.18.0/node_modules/flagged-respawn/lib/respawn.js
Cyryl Płotnicki 2f946d6200 Add .vscode
2016-09-11 10:29:13 +02:00

15 lines
378 B
JavaScript

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;
};