-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
worker.exitedAfterDisconnect is set to false
after worker.kill(), which doesn't comply with the documentation
#51934
Comments
Here's the relevant documentation: Lines 447 to 457 in 84716d8
According to your repro steps, you never call |
okay, I guess it's a types doc issue then? https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v16/cluster.d.ts#L269 Was it previously supported on kill() api as well? or it's just a typo? that's the reason I shared the picture of the typings (I am using types/node version 17) But from code I don't see something like this... 🤔 Or I am looking into the wrong place? 🤔 |
closing this issue as calling |
FYI |
Version
v18.16.0 (haven't check older version btw)
Platform
Linux 6.5.0-21-generic #21-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 7 14:17:40 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
node index.js
e.g.ps -ef | grep index.js
SIGINT
signal, i.e.kill -SIGINT <pid>
How often does it reproduce? Is there a required condition?
always
What is the expected behavior? Why is that the expected behavior?
The expected behavior should be
What do you see instead?
As you can see the
worker.exitedAfterDisconnect
is nottrue
, but the documentation (https://nodejs.org/api/cluster.html#workerexitedafterdisconnect) states that it should be true if youkill()
ordisconnect()
the worker.As you can the worker process exited with code 0, I don't understand which other way it can be exited with code 0 other that what the code is doing...
Additional information
No response
The text was updated successfully, but these errors were encountered: