Windows: port the process helper and fix a stdin deadlock

- Tests: build VoidProcessHelper on Windows with the fork/poll-based modes
  compiled out, binary stdio, and a Windows fd listing; enable the
  ProcessStream suite there.
- Process (Windows): communicate_blocking could block forever when the
  stdin write completed synchronously: the wait only armed pending
  operations, so the stdin pipe was never closed and the child never saw
  EOF. Complete ready operations before waiting, and report real EOF only
  when a read actually reached end of stream.
This commit is contained in:
faumaray committed 2026-12-06 15:42:31 +03:00
1 parent b3c959b920
commit 9f45841c7d
4 files changed
+115 -60

No files matched your search

+3 -3
View File
@@ -232,9 +232,9 @@ endif()
# ── Test-support executables & libraries ──────────────────────────────────────
# These are NOT test files; they are helper executables/libs referenced by tests.
# The process helper is POSIX-only (poll.h, fork/wait); Windows tests that
# need it are guarded or not built.
if(TARGET VoidTests AND (TARGET Void::System OR TARGET Void::IPC) AND NOT WIN32)
# The process helper builds everywhere; the fork/poll-based helper modes are
# POSIX-only and are compiled out on Windows.
if(TARGET VoidTests AND (TARGET Void::System OR TARGET Void::IPC))
add_executable(VoidProcessHelper
"${CMAKE_CURRENT_SOURCE_DIR}/helpers/ProcessHelper.cpp")
set_target_properties(VoidProcessHelper PROPERTIES