mirror of
https://github.com/openai/codex.git
synced 2026-10-21 17:48:44 +00:00
## Why Linux pipe launches need session, parent-death signal, and descriptor setup. Move this work into a fresh, single-threaded executable image to avoid forking the app-server for child setup. ## What changed - Register an early setup helper and launch it through `posix_spawn` for Linux pipe processes. - Start the helper with an empty environment, then transfer the target environment over a control socket so loader settings cannot interfere with helper startup. - Await target execution asynchronously, propagate setup and execution errors, and kill incomplete launches on cancellation. - Preserve direct spawning as a fallback when the helper is unavailable or fails before target execution. ## Testing Add coverage for launch semantics, avoiding fork, loader environment isolation, early argument dispatch, closed standard descriptors, and fallback under bootstrap failure or descriptor pressure. Add an app-server regression test that reuses a process handle after an execution failure. GitOrigin-RevId: 079c673f0f22ebd531f8c57e5338095cc98acfdc
43 lines
930 B
TOML
43 lines
930 B
TOML
[package]
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
name = "codex-utils-pty"
|
|
version.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
anyhow = { workspace = true }
|
|
portable-pty = { workspace = true }
|
|
tokio = { workspace = true, features = ["io-util", "macros", "net", "process", "rt-multi-thread", "signal", "sync", "time"] }
|
|
|
|
[dev-dependencies]
|
|
ctor = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
pretty_assertions = { workspace = true }
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
filedescriptor = "0.8.3"
|
|
lazy_static = { workspace = true }
|
|
log = { workspace = true }
|
|
shared_library = "0.1.9"
|
|
winapi = { version = "0.3.9", features = [
|
|
"handleapi",
|
|
"jobapi",
|
|
"jobapi2",
|
|
"libloaderapi",
|
|
"minwinbase",
|
|
"processthreadsapi",
|
|
"synchapi",
|
|
"winbase",
|
|
"wincon",
|
|
"winerror",
|
|
"winnt",
|
|
] }
|
|
[target.'cfg(unix)'.dependencies]
|
|
libc = { workspace = true }
|
|
|
|
[lib]
|
|
doctest = false
|