I pass arguments when create chlid-processes
if (cluster.isMaster) {
for (var i = 0; i < os.cpus().length; i++) {
var new_worker_env = {};
new_worker_env["WORKER_NAME"] = "worker" + i;
var new_worker = cluster.fork(new_worker_env);
}
}
and then try to read it in childs:
if ( process.env["WORKER_NAME"] != undefined ) instance.name = process.env["WORKER_NAME"];
but this var isn't exist, why?
Node v0.8.8