lib/master.js
function fork(number) {
  var numProc = number || require('os').cpus().length;

  config.n = numProc;

  debug('forking %d workers', numProc);

  forkLoopProtect();

  for (var i = 0; i < numProc; i++) {
    cluster.fork({PWD: config.CWD});
  }
}
function fork(number) {
  var numProc = number || require('os').cpus().length;

  config.n = numProc;

  debug('forking %d workers', numProc);

  forkLoopProtect();

  for (var i = 0; i < numProc; i++) {
    cluster.fork({PWD: config.CWD});
  }
}
function fork ( number ) { var numProc = number || require ( 'os' ) . cpus ( ) . length ; config . n = numProc ; debug ( 'forking %d workers' , numProc ) ; forkLoopProtect ( ) ; for ( var i = 0 ; i < numProc ; i ++ ) { cluster . fork ( { PWD : config . CWD } ) ; } }
Fork Workers N times

@private
@param {int} [number=cpus.length] the number of processes to start
Fork Workers N times