typeduck-codex-execpolicy 0.16.0

Support package for the standalone Codex Web runtime (codex-utils-pty)
Documentation
use super::*;

#[test]
fn process_fallback_terminates_root() -> anyhow::Result<()> {
    let mut child = std::process::Command::new("ping.exe")
        .args(["-n", "60", "127.0.0.1"])
        .stdin(Stdio::null())
        .stdout(Stdio::null())
        .stderr(Stdio::null())
        .spawn()?;
    let mut terminator = PipeChildTerminator {
        windows: WindowsChildTerminator::Process(child.id()),
    };

    terminator.kill()?;

    assert!(!child.wait()?.success());
    Ok(())
}