vmm: prevent CR translation to LF in interactive term#563
Merged
jakecorrenti merged 1 commit intocontainers:mainfrom Feb 26, 2026
Merged
vmm: prevent CR translation to LF in interactive term#563jakecorrenti merged 1 commit intocontainers:mainfrom
jakecorrenti merged 1 commit intocontainers:mainfrom
Conversation
Fix a bug where Carriage Return (CR) get's translated into a Line Feed (LF) in interactive terminal use-cases. Fixes: containers#562 Signed-off-by: Jake Correnti <jakecorrenti+github@proton.me>
Collaborator
|
/gemini review |
Collaborator
|
Probably also fixes this old bug containers/krunvm#39 |
There was a problem hiding this comment.
Code Review
This pull request addresses an issue where carriage returns were incorrectly translated to line feeds in interactive terminal sessions. The fix involves replacing a manual and partial implementation for setting raw terminal mode with a call to the standard cfmakeraw function. This change is a significant improvement as it correctly configures all necessary terminal flags, including ICRNL to prevent the CR/LF translation, thus resolving the bug. The new implementation is more robust, idiomatic, and easier to maintain.
Collaborator
|
Also thanks to @jsks for the detailed bug report! |
This was referenced Feb 26, 2026
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.
Fix a bug where Carriage Return (CR) get's translated into a Line Feed (LF) in interactive terminal use-cases.
Fixes #562