1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
From ec9078d051178837e6d6a082ee165cece89b0aa1 Mon Sep 17 00:00:00 2001
From: Yuriy Chernyshov <[email protected]>
Date: Mon, 22 Sep 2025 16:15:44 +0300
Subject: [PATCH] Use CreateProcessW explicitly to improve compatibility
---
flang-rt/lib/runtime/execute.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/flang-rt/lib/runtime/execute.cpp b/flang-rt/lib/runtime/execute.cpp
index f180da846a32c..779e040bebebc 100644
--- a/flang-rt/lib/runtime/execute.cpp
+++ b/flang-rt/lib/runtime/execute.cpp
@@ -212,7 +212,7 @@ void RTNAME(ExecuteCommandLine)(const Descriptor &command, bool wait,
} else {
// Asynchronous mode
#ifdef _WIN32
- STARTUPINFO si;
+ STARTUPINFOW si;
PROCESS_INFORMATION pi;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);
@@ -234,7 +234,7 @@ void RTNAME(ExecuteCommandLine)(const Descriptor &command, bool wait,
}
FreeMemory(newCmdWin);
- if (CreateProcess(nullptr, wcmd, nullptr, nullptr, FALSE, 0, nullptr,
+ if (CreateProcessW(nullptr, wcmd, nullptr, nullptr, FALSE, 0, nullptr,
nullptr, &si, &pi)) {
// Close handles so it will be removed when terminated
CloseHandle(pi.hProcess);
|