Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2018-01-26 22:16:20 +0300
committercjihrig <cjihrig@gmail.com>2018-01-29 18:24:45 +0300
commite0864e50ecf917cbfa98d443e6f122425d6447cf (patch)
tree37b38c48a4c91d5f9eed9675c705125e3d5dff77 /lib/internal/cluster
parent0778f79cb37526c3f4f8bff525fc4d4ca9b86e78 (diff)
cluster: add cwd to cluster.settings
This commit allows cluster workers to be created with configurable working directories. Fixes: https://github.com/nodejs/node/issues/16388 PR-URL: https://github.com/nodejs/node/pull/18399 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'lib/internal/cluster')
-rw-r--r--lib/internal/cluster/master.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/internal/cluster/master.js b/lib/internal/cluster/master.js
index 280955549ad..570cf7bc6f9 100644
--- a/lib/internal/cluster/master.js
+++ b/lib/internal/cluster/master.js
@@ -126,6 +126,7 @@ function createWorkerProcess(id, env) {
}
return fork(cluster.settings.exec, cluster.settings.args, {
+ cwd: cluster.settings.cwd,
env: workerEnv,
silent: cluster.settings.silent,
windowsHide: cluster.settings.windowsHide,