PR-URL: https://github.com/nodejs/node/pull/10550 Reviewed-By: Rich Trott <rtrott@gmail.com>
7 lines
209 B
JavaScript
7 lines
209 B
JavaScript
const cluster = require('cluster');
|
|
if (cluster.isMaster) {
|
|
cluster.fork(); // one child
|
|
cluster.on('exit', function(worker, code, signal) {
|
|
console.log('worker terminated with code ' + code);
|
|
});
|
|
}
|