mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00
child_process: add support for URL to cp.fork
PR-URL: https://github.com/nodejs/node/pull/41225 Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
23637e9a3b
commit
81812bad7b
3 changed files with 19 additions and 3 deletions
|
@ -91,7 +91,7 @@ const MAX_BUFFER = 1024 * 1024;
|
|||
|
||||
/**
|
||||
* Spawns a new Node.js process + fork.
|
||||
* @param {string} modulePath
|
||||
* @param {string|URL} modulePath
|
||||
* @param {string[]} [args]
|
||||
* @param {{
|
||||
* cwd?: string;
|
||||
|
@ -112,7 +112,7 @@ const MAX_BUFFER = 1024 * 1024;
|
|||
* @returns {ChildProcess}
|
||||
*/
|
||||
function fork(modulePath /* , args, options */) {
|
||||
validateString(modulePath, 'modulePath');
|
||||
modulePath = getValidatedPath(modulePath, 'modulePath');
|
||||
|
||||
// Get options and args arguments.
|
||||
let execArgv;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue