Skip to content

fix(exec): set initial console size before nsenter exec#181

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

fix(exec): set initial console size before nsenter exec#181
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

The child's slave.set_size({}) after setsid was a no-op (/dev/tty == slave, reads 0x0 writes 0x0) so the pty stayed at 0x0 until the first SIGWINCH. Drop it and only set size when consoleSize is given. On the parent side, after receiving the master fd, resize it from the host terminal before attaching (unless consoleSize was set). Accept the small race window: the parent's single ioctl lands within the child's send_fd→execvpe window in practice.

The child's slave.set_size({}) after setsid was a no-op
(/dev/tty == slave, reads 0x0 writes 0x0) so the pty stayed at
0x0 until the first SIGWINCH. Drop it and only set size when
consoleSize is given. On the parent side, after receiving the
master fd, resize it from the host terminal before attaching
(unless consoleSize was set). Accept the small race window:
the parent's single ioctl lands within the child's
send_fd→execvpe window in practice.

Signed-off-by: Yuming He <ComixHe1895@outlook.com>
@ComixHe ComixHe merged commit fc9d817 into OpenAtom-Linyaps:release/2.2 Jun 25, 2026
3 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