Skip to content

execute_process: Restore support for Windows programs requiring specific STARTUPINFO

Upstream libuv supports passing file descriptors >= 3 to child processes via STARTUPINFOW members reserved by the MSVC C run-time. However, some programs use GetStartupInfoW to initialize a STARTUPINFOW structure to pass to CreateProcessW without clearing the reserved members. If we launch such programs with non-zero values in the reserved members, the MSVC C run-time in their children may not correctly associate the stdin/stdout/stderr streams' file descriptors with the corresponding HANDLEs.

Patch our copy of libuv to avoid using the reserved members. This restores execute_process support for the above-described programs as we had prior to !8665 (merged). It also enables support for such programs when launched by ctest.

Fixes: #25996 (closed)
Fixes: #25889 (closed)
Backport: release
Manual-backport: release-3.28

Merge request reports

Loading