fix: Just detach stdin/stdout redirect threads as the program will exit immediately afterwards

(cherry picked from commit aeb58b5e9c3eef9f26fde104a2adc2684423b8ac)
This commit is contained in:
WerWolv
2026-01-07 18:16:17 +01:00
parent ea9b197d36
commit edbd8a811e

View File

@@ -189,9 +189,8 @@ int launchExecutable() {
::CloseHandle(pi.hProcess); ::CloseHandle(pi.hProcess);
::CloseHandle(pi.hThread); ::CloseHandle(pi.hThread);
// Wait for I/O threads to finish stdinThread.detach();
if (stdinThread.joinable()) stdinThread.join(); stdoutThread.detach();
if (stdoutThread.joinable()) stdoutThread.join();
return static_cast<int>(exitCode); return static_cast<int>(exitCode);
} }