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(core): repair SIGINT signals on windows #28496

Merged
merged 2 commits into from
Oct 17, 2024
Merged

fix(core): repair SIGINT signals on windows #28496

merged 2 commits into from
Oct 17, 2024

Conversation

MaxKless
Copy link
Collaborator

@MaxKless MaxKless commented Oct 17, 2024

using windowsHide: true is causing an issue on windows: Ctrl + C handling isn't enabled and no SIGINT is sent to the child process when users exit the process. See nodejs/node#29837 and nodejs/node-v0.x-archive#5054 for reference. This will cause leftover processes throughout nx.

This PR sets windowsHide: false everywhere except for the plugin workers and some short-lived utils. They spawn child processes but have explicit handling to make sure they kill themselves when the parent process dies, so the missing Ctrl + C handling doesn't cause issues.

We will follow up to make sure any other culprits that still cause windows popups (especially when used through Nx Console) are handled. Leaving no leftover processes running is more important for now, though.

Keep in mind the underlying tooling (like vite) might have some windows popups themselves that Nx will inherit.

Copy link

vercel bot commented Oct 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Oct 17, 2024 4:10pm

@jaysoo jaysoo merged commit 499300f into master Oct 17, 2024
6 checks passed
@jaysoo jaysoo deleted the fix-windows-sigint branch October 17, 2024 19:03
jaysoo pushed a commit that referenced this pull request Oct 17, 2024
using `windowsHide: true` is causing an issue on windows: Ctrl + C
handling isn't enabled and no `SIGINT` is sent to the child process when
users exit the process. See nodejs/node#29837
and nodejs/node-v0.x-archive#5054 for
reference. This will cause leftover processes throughout nx.

This PR sets `windowsHide: false` everywhere except for the plugin
workers and some short-lived utils. They `spawn` child processes but
have explicit handling to make sure they kill themselves when the parent
process dies, so the missing Ctrl + C handling doesn't cause issues.

We will follow up to make sure any other culprits that still cause
windows popups (especially when used through Nx Console) are handled.
Leaving no leftover processes running is more important for now, though.

Keep in mind the underlying tooling (like vite) might have some windows
popups themselves that Nx will inherit.
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants