Lightweight coding agent that runs in your terminal
Rust
Fix Windows pseudoconsole attribute handling for sandboxed PTY sessions (#20042)
iceweasel-oai5cac3f896d74
diff --git a/codex-rs/windows-sandbox-rs/src/proc_thread_attr.rs b/codex-rs/windows-sandbox-rs/src/proc_thread_attr.rsindex 7641bb5edd..b814699839 100644--- a/codex-rs/windows-sandbox-rs/src/proc_thread_attr.rs+++ b/codex-rs/windows-sandbox-rs/src/proc_thread_attr.rs@@ -1,3 +1,4 @@+use std::ffi::c_void;use std::io;use windows_sys::Win32::Foundation::GetLastError;use windows_sys::Win32::Foundation::HANDLE;@@ -45,14 +46,13 @@ impl ProcThreadAttributeList {pub fn set_pseudoconsole(&mut self, hpc: isize) -> io::Result<()> {let list = self.as_mut_ptr();- let mut hpc_value = hpc;let ok = unsafe {UpdateProcThreadAttribute(list,0,PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE,- (&mut hpc_value as *mut isize).cast(),- std::mem::size_of::<isize>(),+ hpc as *mut c_void,+ std::mem::size_of::<HANDLE>(),std::ptr::null_mut(),std::ptr::null_mut(),)