node/test/fixtures/cluster-preload-test.js

8 lines
207 B
JavaScript

var cluster = require('cluster');
if (cluster.isMaster) {
cluster.fork(); // one child
cluster.on('exit', function(worker, code, signal) {
console.log('worker terminated with code ' + code);
});
}