0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/fixtures/cluster-preload-test.js
Kabir Islam 1dba1620bb test: replace string concatenation with template
PR-URL: https://github.com/nodejs/node/pull/16916
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
2017-11-11 10:48:45 +01:00

8 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}`);
});
}