forked from enviPath/enviPy
Current Dev State
This commit is contained in:
15
static/js/ketcher2/node_modules/flagged-respawn/lib/respawn.js
generated
vendored
Normal file
15
static/js/ketcher2/node_modules/flagged-respawn/lib/respawn.js
generated
vendored
Normal file
@ -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;
|
||||
};
|
||||
Reference in New Issue
Block a user