Eric Pouech : kernel32: Handle the case where wineconsole isn' t properly started.
Alexandre Julliard
julliard at winehq.org
Sat Aug 29 11:36:48 CDT 2009
Module: wine
Branch: master
Commit: e0319b82c9e1d476e1fad2d30280ae812fe64198
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e0319b82c9e1d476e1fad2d30280ae812fe64198
Author: Eric Pouech <eric.pouech at orange.fr>
Date: Sat Aug 29 14:42:13 2009 +0200
kernel32: Handle the case where wineconsole isn't properly started.
---
dlls/kernel32/console.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c
index 34994af..48bcfa4 100644
--- a/dlls/kernel32/console.c
+++ b/dlls/kernel32/console.c
@@ -1162,10 +1162,17 @@ static BOOL start_console_renderer_helper(const char* appname, STARTUPINFOA*
CreateProcessA(NULL, buffer, NULL, NULL, TRUE, DETACHED_PROCESS,
NULL, NULL, si, &pi))
{
+ HANDLE wh[2];
+ DWORD ret;
+
+ wh[0] = hEvent;
+ wh[1] = pi.hProcess;
+ ret = WaitForMultipleObjects(2, wh, FALSE, INFINITE);
+
CloseHandle(pi.hThread);
CloseHandle(pi.hProcess);
- if (WaitForSingleObject(hEvent, INFINITE) != WAIT_OBJECT_0) return FALSE;
+ if (ret != WAIT_OBJECT_0) return FALSE;
TRACE("Started wineconsole pid=%08x tid=%08x\n",
pi.dwProcessId, pi.dwThreadId);
More information about the wine-cvs
mailing list