codex/bazel/rules/testing
jif 51d4562070 Support close-on-exec attachments without changing PTY semantics (#47797)
## Why

Passing extra descriptors to a PTY previously selected behavior intended for inherited escalation sockets: no EOF on stdin close, different signal exit statuses, and no default `SHELL`. Launch attachments need ordinary PTY behavior and must survive execution even when marked `FD_CLOEXEC`.

## What changed

- Add `ChildFds::Attached` alongside `ChildFds::Inherited` to distinguish launch attachments from legacy inherited descriptors.
- Preserve ordinary EOF, default `SHELL`, and signal exit status behavior for PTY attachments.
- Allow explicitly supplied close-on-exec descriptors through pipe and PTY launches without changing the parent's descriptor flags, using child-side flag updates and macOS spawn inheritance actions.
- Update existing callers to use `ChildFds::Inherited`.

## Testing

Add Unix coverage for attachment accessibility, unchanged parent descriptor flags, default `SHELL`, and signal exit statuses. Extend the PTY stdin-draining test to cover attachments and EOF delivery.

GitOrigin-RevId: 864aedc6c5717d8b43c9d71057c9f54409834509
History 2026-09-24 09:25:19 +00:00
..
compat Run exec-server compatibility tests under Bazel (#40736) 2026-08-25 23:38:49 +00:00
wine Support close-on-exec attachments without changing PTY semantics (#47797) 2026-09-24 09:25:19 +00:00
BUILD.bazel Run core integration tests against a Wine-backed Windows executor (#28401) 2026-06-16 00:38:41 +00:00
foreign_platform_binary.bzl [codex] Add hermetic Wine test support (#27964) 2026-06-12 18:24:49 -07:00