Skip to content

OCPBUGS-4556: src: Fix terminal resize event processing#566

Merged
giuseppe merged 1 commit intocontainers:mainfrom
sohankunkerkar:fix-terminal-size
Jun 13, 2025
Merged

OCPBUGS-4556: src: Fix terminal resize event processing#566
giuseppe merged 1 commit intocontainers:mainfrom
sohankunkerkar:fix-terminal-size

Conversation

@sohankunkerkar
Copy link
Member

When multiple resize events are sent rapidly, only the first event was being processed correctly. Subsequent events in the
same buffer were ignored because read_from_ctrl_buffer() always processed from the beginning of the buffer instead of the current line position. This caused terminals to get stuck at incorrect dimensions, particularly during kubectl/oc debug sessions where resize events are common. The fix ensures each complete line in the control buffer is processed exactly once by passing the correct line start position to the processing function and properly null-terminating each line.

@sohankunkerkar sohankunkerkar changed the title src: Fix terminal resize event processing OCPBUGS-4556: src: Fix terminal resize event processing Jun 12, 2025
The fix ensures each complete line in the control buffer
is processed exactly once by passing the correct line
start position to the processing function and properly
null-terminating each line.

Signed-off-by: Sohan Kunkerkar <sohank2602@gmail.com>
@haircommander
Copy link
Collaborator

LGTM thanks!
@jnovy @giuseppe PTAL

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

/lgtm

@giuseppe giuseppe merged commit b2f13b0 into containers:main Jun 13, 2025
31 of 33 checks passed
@sohankunkerkar sohankunkerkar deleted the fix-terminal-size branch June 13, 2025 21:07
@jnovy
Copy link
Collaborator

jnovy commented Jun 16, 2025

LGTM

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.

4 participants