silk.platform.windows.process.
Direct Windows child execution with explicit inherited handles and owned process cleanup.
Details#
Executable and working-directory paths use the machine namespace /C:/... or /UNC/....
Arguments and environment values use canonical WTF-8. No shell or executable search runs.
Output pipes use overlapped reads so either stream can fill while the other is idle.
Import as WindowsProcess with import silk.platform.windows.process { WindowsProcess }.
Public declarations: 1.
WindowsProcess#
pub struct WindowsProcessDirect Windows execution with a private job, explicit handle inheritance, and complete captures.
Implementation WindowsProcess#
impl WindowsProcessAssociated function execute#
pub effect fn execute(request: &ProcessRequest) -> ProcessOutcome ! ProcessError | OutOfMemoryError ? &mut AllocatorExecutes an absolute machine-path executable with the request's explicit arguments and environment.
Details#
Paths use /C:/... or /UNC/...; text arguments are not path-converted. Raw values must be
canonical WTF-8. Case-insensitive duplicate environment names and .bat/.cmd programs are
refused before launch. The child receives EOF on stdin and only its three standard handles.
It starts suspended, enters a kill-on-close job, then runs without a console window. Both
output streams drain concurrently. When the child exits, remaining descendants are terminated.
All 32 exit bits are preserved as i32; an NTSTATUS-shaped value alone is not classified as a crash.
Errors#
ProcessErrorfor invalid input or an OS spawn, wait, or capture failure.OutOfMemoryErrorif input or capture storage cannot be allocated.
Gotchas#
Blocks the calling thread. Failure after launch terminates and waits for the owned process and cancels pending reads before freeing their storage. A trap can bypass language cleanup; the OS still closes the job when the parent process terminates.
Category: Windows platform.
Profiles: x86_64-pc-windows-msvc.