Files
codex/codex-rs/linux-sandbox/tests
viyatb-oai 641b4cac88 Tie Linux sandbox proxy bridges to the launcher lifetime (#61898)
## Why

Host proxy bridges must close active connections when a sandbox exits or is cancelled. Proxy descriptor exhaustion must also leave synthetic mount cleanup able to run.

## What changed

- Run host proxy bridges as threads in an outer supervisor that forwards signals and preserves the sandbox command's exit status. Use parent-death signals to terminate supervised children when their parent exits.
- Give bridge routes private descriptor tables where supported, retry accepts after descriptor exhaustion, and keep mount cleanup in a separate supervisor.
- Create the transparent TCP namespace in the bubblewrap child after re-executing the sandbox helper, clearing inherited credentials from memory and restoring dumpability for user namespace ID mapping.

## Testing

Add regression tests for bridge teardown after normal exit, process-group cancellation, launcher termination, and caller-thread exit; exit status propagation with inherited `SIGCHLD` ignored; and SOCKS connectivity and synthetic mount cleanup under descriptor pressure.

GitOrigin-RevId: dd297af98e9383942098fab5683ef2474c5ae554
2026-11-16 22:27:42 +00:00
..