You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
470 B

'use strict';
const common = require('../common');
const assert = require('assert');
const cluster = require('cluster');
if (!cluster.isMaster) {
process.exit(42);
} else {
var worker = cluster.fork();
worker.on('exit', common.mustCall(function(exitCode, signalCode) {
assert.strictEqual(exitCode, 42);
assert.strictEqual(signalCode, null);
}));
cluster.on('exit', common.mustCall(function(worker_) {
assert.strictEqual(worker_, worker);
}));
}