Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/flagged-respawn/ drwxr-xr-x | |
| Viewing file: Select action/file-type: var reorder = require('./lib/reorder');
var respawn = require('./lib/respawn');
var remover = require('./lib/remover');
var FORBID_RESPAWNING_FLAG = '--no-respawning';
module.exports = function(flags, argv, forcedFlags, execute) {
if (!flags) {
throw new Error('You must specify flags to respawn with.');
}
if (!argv) {
throw new Error('You must specify an argv array.');
}
if (typeof forcedFlags === 'function') {
execute = forcedFlags;
forcedFlags = [];
}
if (typeof forcedFlags === 'string') {
forcedFlags = [forcedFlags];
}
if (!Array.isArray(forcedFlags)) {
forcedFlags = [];
}
var index = argv.indexOf(FORBID_RESPAWNING_FLAG);
if (index >= 0) {
argv = argv.slice(0, index).concat(argv.slice(index + 1));
argv = remover(flags, argv);
execute(true, process, argv);
return;
}
var proc = process;
var reordered = reorder(flags, argv);
var ready = JSON.stringify(argv) === JSON.stringify(reordered);
if (forcedFlags.length) {
reordered = reordered.slice(0, 1)
.concat(forcedFlags)
.concat(reordered.slice(1));
ready = false;
}
if (!ready) {
reordered.push(FORBID_RESPAWNING_FLAG);
proc = respawn(reordered);
}
execute(ready, proc, reordered);
};
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0048 ]-- |