Fix: Resolve stdin/stdout I/O errors on macOS/Linux after tool update and relaunch#490
Merged
Conversation
spouliot
approved these changes
Dec 2, 2025
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses stdin/stdout I/O errors that occurred when the uno-check tool updated and relaunched itself on macOS/Linux systems. The solution replaces the previous background process approach with an atomic process replacement using the Unix execv() system call via P/Invoke, which preserves the terminal session and file descriptors.
Key changes:
- Implements P/Invoke signature for Unix
execv()system call - Generates a temporary shell script that handles the update sequence and relaunches the tool
- Uses
execv()to atomically replace the current process, maintaining terminal connectivity
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
@ajpinedam I've opened a new pull request, #491, to work on those changes. Once the pull request is ready, I'll request review from you. |
Takoooooo
approved these changes
Dec 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue: closes #
PR Type:
What is the current behavior? 🤔
When users selected the "Update" option on macOS/Linux, the tool would update and relaunch, but the relaunched process lost its connection to the terminal's stdin. This caused interactive CLI prompts to fail with errors like:
"zsh: command not found: n"
"Error Input/Output error"
Users were unable to respond to prompts such as "Attempt to fix? [y/n]" after the relaunch.
What is the new behavior? 🚀
Implemented atomic process replacement on Unix systems using the execv() system call via P/Invoke. A temporary shell script performs the update and relaunch sequence, with execv() replacing the current process to preserve the terminal session and file descriptors (stdin/stdout/stderr). This ensures interactive CLI prompts function correctly after the tool updates itself.
PR Checklist ✅
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information ℹ️