Skip to content

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

Merged
copybara-service[bot] merged 1 commit intogoogle:masterfrom
jbms:tcgets2
Mar 15, 2026
Merged

devpts: Support TCGETS2, TCSETS2, TCSETSW2, TCSETSF2#12589
copybara-service[bot] merged 1 commit intogoogle:masterfrom
jbms:tcgets2

Conversation

@jbms
Copy link
Copy Markdown
Contributor

@jbms jbms commented Feb 6, 2026

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

copybara-service bot pushed a commit that referenced this pull request Feb 24, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 641c4bf
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 24, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 641c4bf
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 c67b838
PiperOrigin-RevId: 874690940
Copy link
Copy Markdown
Collaborator

@EtiennePerot EtiennePerot left a comment

Choose a reason for hiding this comment

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

Some missing/extranous headers in host_pty.cc

copybara-service bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 8aa1289
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 8aa1289
PiperOrigin-RevId: 874690940
Copy link
Copy Markdown
Collaborator

@EtiennePerot EtiennePerot left a comment

Choose a reason for hiding this comment

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

Sorry, back for more :)

copybara-service bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 8aa1289
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 8aa1289
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 f1e6c32
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 f1e6c32
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 f1e6c32
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 f1e6c32
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 f1e6c32
PiperOrigin-RevId: 874690940
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 bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 25, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 26, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24
PiperOrigin-RevId: 874690940
copybara-service bot pushed a commit that referenced this pull request Feb 27, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24
PiperOrigin-RevId: 876446717
copybara-service bot pushed a commit that referenced this pull request Feb 28, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24
PiperOrigin-RevId: 876446717
copybara-service bot pushed a commit that referenced this pull request Mar 2, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24
PiperOrigin-RevId: 876446717
copybara-service bot pushed a commit that referenced this pull request Mar 2, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24
PiperOrigin-RevId: 876446717
copybara-service bot pushed a commit that referenced this pull request Mar 2, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24
PiperOrigin-RevId: 876446717
copybara-service bot pushed a commit that referenced this pull request Mar 3, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24
PiperOrigin-RevId: 876446717
copybara-service bot pushed a commit that referenced this pull request Mar 5, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24
PiperOrigin-RevId: 876446717
copybara-service bot pushed a commit that referenced this pull request Mar 5, 2026
glibc 2.42 uses TCGETS2 in isatty, and fails to properly detect ttys
without TCGETS2 supported.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#12589 from jbms:tcgets2 b8a4f24
PiperOrigin-RevId: 876446717
copybara-service bot pushed a commit that referenced this pull request Mar 6, 2026
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
PiperOrigin-RevId: 876446717
copybara-service bot pushed a commit that referenced this pull request Mar 6, 2026
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
PiperOrigin-RevId: 876446717
copybara-service bot pushed a commit that referenced this pull request Mar 13, 2026
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
PiperOrigin-RevId: 876446717
copybara-service bot pushed a commit that referenced this pull request Mar 13, 2026
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
PiperOrigin-RevId: 876446717
copybara-service bot pushed a commit that referenced this pull request Mar 13, 2026
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
PiperOrigin-RevId: 876446717
@copybara-service copybara-service bot merged commit 9355540 into google:master Mar 15, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants