Skip to content

fix(tty): set initial console size before exec#180

Merged
ComixHe merged 1 commit into
OpenAtom-Linyaps:release/2.2from
ComixHe:release/2.2
Jun 25, 2026
Merged

fix(tty): set initial console size before exec#180
ComixHe merged 1 commit into
OpenAtom-Linyaps:release/2.2from
ComixHe:release/2.2

Conversation

@ComixHe

@ComixHe ComixHe commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

When config.json omits process.consoleSize the container pty kept its default 0x0 until the first SIGWINCH, so early reads of TIOCGWINSZ (e.g. stty size) returned zeros. Resize the master from the host terminal right after receiving its fd, before the child execs, so the initial size is always correct. consoleSize, when set, is still honored by the in-container slave.set_size().

When config.json omits process.consoleSize the container pty kept its
default 0x0 until the first SIGWINCH, so early reads of TIOCGWINSZ
(e.g. `stty size`) returned zeros. Resize the master from the host
terminal right after receiving its fd, before the child execs, so the
initial size is always correct. consoleSize, when set, is still
honored by the in-container slave.set_size().

Signed-off-by: Yuming He <ComixHe1895@outlook.com>
@ComixHe ComixHe merged commit 8cf650c into OpenAtom-Linyaps:release/2.2 Jun 25, 2026
4 of 5 checks passed
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.

1 participant