Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
cluster: allow env object to be passed to cluster.fork()
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Nov 7, 2011
1 parent 6a83df0 commit 58b558a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ function eachWorker(cb) {
};


cluster.fork = function() {
cluster.fork = function(env) {
// This can only be called from the master.
assert(cluster.isMaster);

// Lazily start the master process stuff.
startMaster();

var id = ++ids;
var envCopy = {};
var envCopy = env || {};

for (var x in process.env) {
envCopy[x] = process.env[x];
Expand Down

0 comments on commit 58b558a

Please sign in to comment.