diff --git a/lib/child_process.js b/lib/child_process.js index e3691639a9fddd..9eab95d83544be 100644 --- a/lib/child_process.js +++ b/lib/child_process.js @@ -88,6 +88,15 @@ const { const MAX_BUFFER = 1024 * 1024; +/** + * Spawns a new Node.js insatnce + * using the execPath of the parent process + * @param {string} modulePath + * @param {string[]} args + * @param {Object} options + * @returns {ChildProcess} + */ + function fork(modulePath /* , args, options */) { validateString(modulePath, 'modulePath'); @@ -206,6 +215,16 @@ ObjectDefineProperty(exec, promisify.custom, { value: customPromiseExecFunction(exec) }); +/** + * Spawns the new specified excutable file + * as a new process + * @param {string} file + * @param {string[]} args + * @param {Object} options + * @param {Function} callback + * @returns {ChildProcess} + */ + function execFile(file /* , args, options, callback */) { let args = []; let callback;