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.

18 lines
448 B

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