[PATCH v4] programs/winetest: don't create console when non connected to a console
Eric Pouech
eric.pouech at gmail.com
Wed Mar 30 10:58:57 CDT 2022
Fixing a regression from f034084d49b354811096524d472ae5172ac1cebf.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
v2: only pass DETACH_PROCESS when not attached to a console
v3: fix typo
v4: actually fixing the typo (sigh)
---
programs/winetest/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/programs/winetest/main.c b/programs/winetest/main.c
index eb86770afbf..12c07551285 100644
--- a/programs/winetest/main.c
+++ b/programs/winetest/main.c
@@ -640,6 +640,8 @@ run_ex (char *cmd, HANDLE out_file, const char *tempdir, DWORD ms, BOOL nocritic
else
flags = CREATE_DEFAULT_ERROR_MODE;
+ /* don't (potentially) create a console when not attached to one */
+ if (!GetConsoleCP()) flags |= DETACHED_PROCESS;
if (!CreateProcessA (NULL, cmd, NULL, NULL, TRUE, flags,
NULL, tempdir, &si, &pi))
{
More information about the wine-devel
mailing list