mirror of
https://github.com/openai/codex.git
synced 2026-10-28 18:58:46 +00:00
## Why Replacing the Node process lets the native binary receive signals and report its termination directly. ## What changed - Use `process.execve` on non-Windows platforms when available, preserving CLI arguments and the prepared environment. - Install a `SIGXFSZ` handler before replacement so the native binary gets the default signal disposition instead of inheriting Node's ignored signal. - Retain asynchronous spawning for Windows and older Node versions. ## Testing Extend the exit-status test to check that `execve` leaves no child process and that `SIGHUP` and `SIGXFSZ` terminate it with the original signal, while retaining coverage for the spawn fallback. GitOrigin-RevId: 7437f15af419fce5b10c1c00425c7d38160991fc