Files
codex/codex-rs/utils
viyatb-oai bf3eb2ec91 Prevent Unix PTY I/O from blocking runtime shutdown (#40460)
## Why

Blocking PTY reads and output-channel sends can keep Tokio runtime shutdown
waiting when a detached child retains the terminal or output backpressure fills
the channel.

## What changed

- Drive Unix PTY reads and writes through nonblocking `AsyncFd` readiness so
  their tasks can be cancelled during shutdown.
- Keep draining child output after its receiver closes, and preserve queued
  input plus EOF delivery when portable PTY stdin closes.
- Return a descriptive error when PTY spawning uses a Tokio runtime without an
  I/O driver.

## Testing

Add Unix coverage for detached children, full and dropped output channels,
large input with EOF, inherited file descriptors, and runtimes without I/O.

GitOrigin-RevId: f7f1f58abebf8bf1d39285cd61b8d69946d54155
2026-08-24 19:25:32 +00:00
..