Skip to content

devpts: Support TCGETS2, TCSETS2, TCSETSW2, TCSETSF2#12662

Merged
copybara-service[bot] merged 2 commits intomasterfrom
test/cl876446717
Mar 15, 2026
Merged

devpts: Support TCGETS2, TCSETS2, TCSETSW2, TCSETSF2#12662
copybara-service[bot] merged 2 commits intomasterfrom
test/cl876446717

Conversation

@copybara-service
Copy link
Copy Markdown

@copybara-service copybara-service bot commented Feb 27, 2026

devpts: Support TCGETS2, TCSETS2, TCSETSW2, TCSETSF2

glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

This commit also adds support for treating additional host TTY file descriptors (not just stdin/stdout/stderr) passed to a container process as TTYs inside the sandbox. Previously, such file descriptors were not considered TTYs inside the sandbox.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24

glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

This commit also adds support for passing additional TTY file
descriptors (fd numbers > 2) from the host, which is needed by the
new host_pty test but may also be independently useful.

In line_discipline.go, ensure that termios state is not overwritten
on CopyIn failure (e.g. EFAULT). This was reported in review. A
regression test is added.

Move kernel_termios operators to pty_util for reuse.
@copybara-service copybara-service bot added the exported Issue was exported automatically label Feb 27, 2026
@copybara-service copybara-service bot force-pushed the test/cl876446717 branch 9 times, most recently from eed5dae to 4fae23b Compare March 6, 2026 22:37
@copybara-service copybara-service bot force-pushed the test/cl876446717 branch 3 times, most recently from 4ddfb0f to f60c938 Compare March 13, 2026 23:37
PiperOrigin-RevId: 883843637
@copybara-service copybara-service bot merged commit 9355540 into master Mar 15, 2026
@copybara-service copybara-service bot deleted the test/cl876446717 branch March 15, 2026 04:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exported Issue was exported automatically

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants