chore: refactor exec.rs: create separate seatbelt.rs and spawn.rs files (#1762)

At 550 lines, `exec.rs` was a bit large. In particular, I found it hard
to locate the Seatbelt-related code quickly without a file with
`seatbelt` in the name, so this refactors things so:

- `spawn_command_under_seatbelt()` and dependent code moves to a new
`seatbelt.rs` file
- `spawn_child_async()` and dependent code moves to a new `spawn.rs`
file
This commit is contained in:
Michael Bolin
2025-07-31 13:11:47 -07:00
committed by GitHub
parent 9aa11269a5
commit 5a0ad5ab8f
10 changed files with 210 additions and 192 deletions

View File

@@ -1,7 +1,7 @@
#![expect(clippy::unwrap_used)]
use assert_cmd::Command as AssertCommand;
use codex_core::exec::CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR;
use codex_core::spawn::CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR;
use std::time::Duration;
use std::time::Instant;
use tempfile::TempDir;