/usr/lib/nodejs/flagged-respawn/index.js is in node-flagged-respawn 0.3.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | const reorder = require('./lib/reorder');
const respawn = require('./lib/respawn');
module.exports = function (flags, argv, execute) {
if (!flags) {
throw new Error('You must specify flags to respawn with.');
}
if (!argv) {
throw new Error('You must specify an argv array.');
}
var proc = process;
var reordered = reorder(flags, argv);
var ready = JSON.stringify(argv) === JSON.stringify(reordered);
if (!ready) {
proc = respawn(reordered);
}
execute(ready, proc);
};
|