https://bugs.winehq.org/show_bug.cgi?id=48449
--- Comment #1 from timotheecisnard@gmail.com --- Adding the reproducer inline since the Debian paste has had plenty of time to expire =)
``` #include <windows.h> #include <string>
using namespace std;
int main(int argc, char* argv[]) { string cmdline = "cmd.exe /Q /C "echo 2" >> out.txt\n";
PROCESS_INFORMATION piProcInfo; STARTUPINFOA siStartInfo; ZeroMemory(&piProcInfo, sizeof(PROCESS_INFORMATION)); ZeroMemory(&siStartInfo, sizeof(STARTUPINFOA)); siStartInfo.cb = sizeof(STARTUPINFOA); CreateProcessA(nullptr, (char*)cmdline.data(), nullptr, nullptr, false, 0, nullptr, nullptr, &siStartInfo, &piProcInfo); CloseHandle(piProcInfo.hProcess); CloseHandle(piProcInfo.hThread); } ```
On Windows, this will create "out.txt" as expected, on Wine this prints "Invalid name." and the command is not run.