System: Windows process and handle support for the runner subset #40

Closed
opened 2026-12-03 10:24:25 +00:00 by faumaray · 1 comment
Owner

Context: Forge ships Linux and Windows CI runners. Forge tracks this as VL-WIN-01.

Current behavior: On Windows, spawn/communication/wait/termination return unsupported; OwnedFd has no Windows HANDLE ownership; Http.cpp contains POSIX temporary-file operations; native IO currently exposes epoll. void_add_module also gathers a module's .cpp files recursively, so selecting Net does not exclude its POSIX server.

Need: qualify outbound authenticated control, artifact transfers, processes and workspace files on Windows. A Windows server port is not required. Require correct argument/environment encoding, restricted handle inheritance, cancellable pipes, process-tree containment and verified cleanup. Handle Unicode paths, replacement failures, reparse points, long paths and sharing violations explicitly.

Proposed direction: a private native-handle backend for the binary process session and platform file-transfer helpers, with source selection or a client component rather than porting unrelated server code. Never cast HANDLEs into integer descriptor ownership.

Tests/gate: real Windows execution covering quoting, inherited-handle leaks, descendant cleanup, interrupted transfers, invalid certificates and hostile workspace paths. Unsupported capabilities must fail closed; Linux regressions must pass. Gates Forge M15, M16 and cutover.

Context: Forge ships Linux and Windows CI runners. Forge tracks this as VL-WIN-01. Current behavior: On Windows, spawn/communication/wait/termination return unsupported; OwnedFd has no Windows HANDLE ownership; Http.cpp contains POSIX temporary-file operations; native IO currently exposes epoll. void_add_module also gathers a module's .cpp files recursively, so selecting Net does not exclude its POSIX server. Need: qualify outbound authenticated control, artifact transfers, processes and workspace files on Windows. A Windows server port is not required. Require correct argument/environment encoding, restricted handle inheritance, cancellable pipes, process-tree containment and verified cleanup. Handle Unicode paths, replacement failures, reparse points, long paths and sharing violations explicitly. Proposed direction: a private native-handle backend for the binary process session and platform file-transfer helpers, with source selection or a client component rather than porting unrelated server code. Never cast HANDLEs into integer descriptor ownership. Tests/gate: real Windows execution covering quoting, inherited-handle leaks, descendant cleanup, interrupted transfers, invalid certificates and hostile workspace paths. Unsupported capabilities must fail closed; Linux regressions must pass. Gates Forge M15, M16 and cutover.
Author
Owner

Implemented on branch issue-40-windows-process (commit 29b4683): native Windows process backend (ProcessWindows.cpp) with HANDLE ownership, CreateProcessW quoting/environment, restrictive handle inheritance, Job Object containment, overlapped-pipe BinarySession, plus platform source selection (IO epoll and Net HTTP server excluded on Windows) and a Windows-safe download temp-file path. Merged into main. MinGW-w64 cross-compile is clean and the Linux System suite still passes. Real Windows execution tests remain a follow-up. Closing as done.

Implemented on branch `issue-40-windows-process` (commit `29b4683`): native Windows process backend (`ProcessWindows.cpp`) with HANDLE ownership, CreateProcessW quoting/environment, restrictive handle inheritance, Job Object containment, overlapped-pipe BinarySession, plus platform source selection (IO epoll and Net HTTP server excluded on Windows) and a Windows-safe download temp-file path. Merged into `main`. MinGW-w64 cross-compile is clean and the Linux System suite still passes. Real Windows execution tests remain a follow-up. Closing as done.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Void/Library#40