summaryrefslogtreecommitdiff
path: root/lib/cluster.js
diff options
context:
space:
mode:
authorAndreas Madsen <amwebdk@gmail.com>2012-05-20 15:57:24 +0200
committerBen Noordhuis <info@bnoordhuis.nl>2012-05-21 23:27:44 +0200
commit81a4edcf6afc1180b80a516db894db400ce04b1a (patch)
tree038d5e6c4584c63dc8f8bfd974feec6abe970d73 /lib/cluster.js
parent968b49ba0a6329af83b46c598524d7ae2460df57 (diff)
downloadandroid-node-v8-81a4edcf6afc1180b80a516db894db400ce04b1a.tar.gz
android-node-v8-81a4edcf6afc1180b80a516db894db400ce04b1a.tar.bz2
android-node-v8-81a4edcf6afc1180b80a516db894db400ce04b1a.zip
cluster: remove NODE_UNIQUE_ID from env on startup
In case a worker would spawn a new subprocess with process.env, NODE_UNIQUE_ID would have been a part of the env. Making the new subprocess believe it is a worker, this would result in some confusion if the subprocess where to listen to a port, since the server handle request would then be relayed to the worker. This patch removes the NODE_UNIQUE_ID flag from process.env on startup so any subprocess spawned by a worker is a normal process with no cluster stuff.
Diffstat (limited to 'lib/cluster.js')
-rw-r--r--lib/cluster.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/cluster.js b/lib/cluster.js
index df3479950e..6245fc8e1c 100644
--- a/lib/cluster.js
+++ b/lib/cluster.js
@@ -33,7 +33,7 @@ var debug;
if (process.env.NODE_DEBUG && /cluster/.test(process.env.NODE_DEBUG)) {
debug = function(x) {
var prefix = process.pid + ',' +
- (process.env.NODE_WORKER_ID ? 'Worker' : 'Master');
+ (process.env.NODE_UNIQUE_ID ? 'Worker' : 'Master');
console.error(prefix, x);
};
} else {