-
Notifications
You must be signed in to change notification settings - Fork 2k
Fix terminal corruption on unexpected termination by adding signal handlers #10326
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
Conversation
… handling and scrollback management
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@CodeMan62 is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
Just making sure, this is for #10210, correct? |
@anthonyshew yes sorry i forget to mention the issue in description let me update it |
No worries! Thank you for the PR. 🙌 We'll review soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already register signal handlers in the main binary: https://github.com/vercel/turborepo/blob/main/crates/turborepo-lib/src/commands/run.rs#L12. These handlers send a stop event to the TUI receiver and the TUI then does the terminal cleanup.
We do not want to overwrite these signal handlers as there are other parts of the system that rely on those previous handlers being registered.
In your testing instructions you have
Verifying terminal state restoration by checking for visual corruption after forced termination
Do your have a system where the current release results in artifacts and this PR doesn't when you send SIGINT
to turbo
?
No, I haven't observed any visual artifacts when sending SIGINT to |
Hey @chris-olszewski is there anything left or if this seems not to solve the actual problem can you guide me |
I do not think this strategy solves the problem. #10210 has 2 issues reported in it:
|
Description
When the Turborepo TUI is terminated unexpectedly (via SIGINT, SIGTERM, etc.), the terminal can be left in a corrupted state, causing strange characters to appear when hovering over the terminal. This PR addresses this issue by adding proper signal handling in app.rs with platform-specific implementations for both Unix and Windows, implementing an emergency terminal cleanup procedure that safely restores terminal state on abrupt termination, enhancing scrollback management in grid.rs to handle edge cases better, and adding proper dependency management for required signal handling libraries.
Fixes #10210
Testing Instructions