CreateProcess with no application name looked for the program of its
command line in the caller's folder, the current folder, System32 and the
Windows folder, but never in PATH, where Windows looks last (after the
16-bit System folder, also added). Nim starts gcc.exe that way and could not
build anything. The folders of PATH come from one place now, which the
library search already used.
Assisted-by: Claude Code:claude-opus-5-5
AI-Scope: the program search of CreateProcess
(cherry picked from commit f1d78cb8c699516f471e44c81252c65f9c896f58)
CreateProcessW read the caller's environment block in 4096-byte pieces from
its start, so a block that ends less than a page before unmapped memory
failed the call with ERROR_NOACCESS. Zig hit this when it started its
linker. The block is now read up to each page boundary, as strings are.
Assisted-by: Claude Code:claude-opus-5-5
AI-Scope: the environment block reader
(cherry picked from commit 0cd1074ec232ef2824f0eefb7ed69d3b78d1f8ec)
A console program started from a terminal gets it as its console without --stdio=inherit. CreateProcess runs .bat and .cmd
files through cmd /c, as Windows does. The console code pages start as UTF-8, since Raven has no table for code page 437.
Assisted-by: Claude Code:claude-opus-5-5
AI-Scope: Wrote the subsystem check, the batch-file launch, a first command processor from Microsoft's public cmd documentation and its test.