Commit e0319b82 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

kernel32: Handle the case where wineconsole isn't properly started.

parent 09adcee2
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment