Skip to content
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

fix(node-runtime-worker-thread): close child process on parent disconnect #1349

Merged
merged 1 commit into from
Sep 21, 2022

Conversation

addaleax
Copy link
Contributor

This ensure that the auxilliary child processes stops once its parent process has terminated, even if it did not perform a proper shutdown of the child process.

…nect

This ensure that the auxilliary child processes stops once its parent
process has terminated, even if it did not perform a proper shutdown
of the child process.
@@ -114,6 +114,7 @@ const messageBus = createCaller(['emit', 'on'], process);

exposeAll(messageBus, workerProcess);

process.once('disconnect', () => process.exit());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohhh, TIL!

@addaleax addaleax merged commit 36a3b46 into main Sep 21, 2022
@addaleax addaleax deleted the close-child-process-on-parent-exit branch September 21, 2022 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants