This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
cluster: exception in master doesn't kill workers #2047
Closed
Description
To reproduce:
var assert = require('assert');
var cluster = require('cluster');
if (cluster.isMaster) {
cluster.fork();
throw new Error('kill master'); // should kill the worker too
} else {
setTimeout(function() {
assert(false, 'worker should have been killed');
}, 2500);
}
The workers array is empty in the uncaughtException listener that startMaster() installs so the listener doesn't actually kill anything.
Activity