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 project local dev exit cleanup #956

Merged
merged 5 commits into from
Nov 14, 2023

Conversation

brandenrodgers
Copy link
Contributor

@brandenrodgers brandenrodgers commented Nov 14, 2023

Description and Context

Fixes #953

There were a handful of issues in our handleExit util. It's the util that attempts to catch the various different exit signals, which allows us to gracefully exit the process. The major things I changed:

  • Only trigger the exit once (We were sometimes triggering multiple times, especially when uncaughtException is triggered)
  • Prevent interacting with stdout when the parent terminal is closed
  • Adds a debug log to the termination callback to make it easier to figure out what's happening

This article was a useful resource: https://thomashunter.name/posts/2021-03-08-the-death-of-a-nodejs-process

Screenshots

TODO

Who to Notify

Copy link
Contributor

@camden11 camden11 left a comment

Choose a reason for hiding this comment

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

LGTM

@brandenrodgers brandenrodgers merged commit 30cfa00 into master Nov 14, 2023
1 check passed
@brandenrodgers brandenrodgers deleted the br-fix-dev-mode-termination-cleanup branch November 14, 2023 20:58
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.

Can`t cancel a local dev server
2 participants