We need to process cluster workers before any preload modules is executed. Otherwise, the child processes are not correctly disovered as clustered workers inside the preloaded modules. Fixes: https://github.com/iojs/io.js/issues/1269 PR-URL: https://github.com/iojs/io.js/pull/1314 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Fedor Indutny <fedor@indutny.com>
3 lines
155 B
JavaScript
3 lines
155 B
JavaScript
var cluster = require('cluster');
|
|
cluster.isMaster || process.exit(42 + cluster.worker.id); // +42 to distinguish
|
|
// from exit(1) for other random reasons
|