Skip to content
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
bnoordhuis opened this issue Nov 8, 2011 · 0 comments
Closed

cluster: exception in master doesn't kill workers #2047

bnoordhuis opened this issue Nov 8, 2011 · 0 comments
Labels

Comments

@bnoordhuis
Copy link
Member

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.

@ghost ghost assigned ry Nov 8, 2011
@ry ry closed this as completed in da9bf0e Nov 9, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants