child_process: set shell to false in fork()
This commit ensures that spawn()'s shell option is unconditionally set to false when fork() is called. Refs: https://github.com/nodejs/node/pull/15299 Fixes: https://github.com/nodejs/node/issues/13983 PR-URL: https://github.com/nodejs/node/pull/15352 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
b8d532c4bd
commit
ed2f347f27
@ -356,6 +356,9 @@ output on this fd is expected to be line delimited JSON objects.
|
||||
*Note*: Unlike the fork(2) POSIX system call, `child_process.fork()` does
|
||||
not clone the current process.
|
||||
|
||||
*Note*: The `shell` option available in [`child_process.spawn()`][] is not
|
||||
supported by `child_process.fork()` and will be ignored if set.
|
||||
|
||||
### child_process.spawn(command[, args][, options])
|
||||
<!-- YAML
|
||||
added: v0.1.90
|
||||
|
@ -93,6 +93,7 @@ exports.fork = function(modulePath /*, args, options*/) {
|
||||
}
|
||||
|
||||
options.execPath = options.execPath || process.execPath;
|
||||
options.shell = false;
|
||||
|
||||
return spawn(options.execPath, args, options);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user