Actualizacion de seguridad
This commit is contained in:
17
node_modules/nodemon/lib/monitor/run.js
generated
vendored
17
node_modules/nodemon/lib/monitor/run.js
generated
vendored
@@ -16,6 +16,7 @@ var restart = null;
|
||||
var psTree = require('pstree.remy');
|
||||
var path = require('path');
|
||||
var signals = require('./signals');
|
||||
const undefsafe = require('undefsafe');
|
||||
const osRelease = parseInt(require('os').release().split('.')[0], 10);
|
||||
|
||||
function run(options) {
|
||||
@@ -63,8 +64,11 @@ function run(options) {
|
||||
const binPath = process.cwd() + '/node_modules/.bin';
|
||||
|
||||
const spawnOptions = {
|
||||
env: Object.assign({}, process.env, options.execOptions.env, {
|
||||
PATH: binPath + path.delimiter + process.env.PATH,
|
||||
env: Object.assign({}, options.execOptions.env, process.env, {
|
||||
PATH:
|
||||
binPath +
|
||||
path.delimiter +
|
||||
(undefsafe(options, '.execOptions.env.PATH') || process.env.PATH),
|
||||
}),
|
||||
stdio: stdio,
|
||||
};
|
||||
@@ -129,7 +133,7 @@ function run(options) {
|
||||
silent: !hasStdio,
|
||||
};
|
||||
if (utils.isWindows) {
|
||||
forkOptions.windowsHide = true;
|
||||
forkOptions.windowsHide = true;
|
||||
}
|
||||
child = fork(options.execOptions.script, forkArgs, forkOptions);
|
||||
utils.log.detail('forking');
|
||||
@@ -341,7 +345,12 @@ function kill(child, signal, callback) {
|
||||
// We are handling a 'SIGKILL' , 'SIGUSR2' and 'SIGUSR1' POSIX signal under Windows the
|
||||
// same way it is handled on a UNIX system: We are performing
|
||||
// a hard shutdown without waiting for the process to clean-up.
|
||||
if (signal === 'SIGKILL' || osRelease < 10 || signal === 'SIGUSR2' || signal==="SIGUSR1" ) {
|
||||
if (
|
||||
signal === 'SIGKILL' ||
|
||||
osRelease < 10 ||
|
||||
signal === 'SIGUSR2' ||
|
||||
signal === 'SIGUSR1'
|
||||
) {
|
||||
debug('terminating process group by force: %s', child.pid);
|
||||
|
||||
// We are using the taskkill utility to terminate the whole
|
||||
|
||||
Reference in New Issue
Block a user