mirror of
https://github.com/openai/codex.git
synced 2026-11-01 16:17:58 +00:00
Add Windows sandbox unified exec runtime support (#15578)
## Summary This is the runtime/foundation half of the Windows sandbox unified-exec work. - add Windows sandbox `unified_exec` session support in `windows-sandbox-rs` for both: - the legacy restricted-token backend - the elevated runner backend - extend the PTY/process runtime so driver-backed sessions can support: - stdin streaming - stdout/stderr separation - exit propagation - PTY resize hooks - add Windows sandbox runtime coverage in `codex-windows-sandbox` / `codex-utils-pty` This PR does **not** enable Windows sandbox `UnifiedExec` for product callers yet because hooking this up to app-server comes in the next PR. Windows sandbox advertising is intentionally kept aligned with `main`, so sandboxed Windows callers still fall back to `ShellCommand`. This PR isolates the runtime/session layer so it can be reviewed independently from product-surface enablement. --------- Co-authored-by: jif-oai <jif@openai.com> Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
co-authored by
jif-oai
Codex
parent
38ba876ea9
commit
8612714aa6
@@ -118,6 +118,10 @@ fn windows_build_number() -> Option<u32> {
|
||||
|
||||
pub struct PsuedoCon {
|
||||
con: HPCON,
|
||||
// CreatePseudoConsole borrows these pipe handles for the lifetime of the
|
||||
// pseudoconsole, so we must keep owning them until ClosePseudoConsole.
|
||||
_input: FileDescriptor,
|
||||
_output: FileDescriptor,
|
||||
}
|
||||
|
||||
unsafe impl Send for PsuedoCon {}
|
||||
@@ -149,7 +153,11 @@ impl PsuedoCon {
|
||||
result == S_OK,
|
||||
"failed to create psuedo console: HRESULT {result}"
|
||||
);
|
||||
Ok(Self { con })
|
||||
Ok(Self {
|
||||
con,
|
||||
_input: input,
|
||||
_output: output,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn resize(&self, size: COORD) -> Result<(), Error> {
|
||||
|
||||
Reference in New Issue
Block a user