kernel32: Don't get stuck if the debugger exits without signaling the event.
This commit is contained in:
parent
403786bb37
commit
2bdf6c75ec
|
@ -319,7 +319,16 @@ static BOOL start_debugger(PEXCEPTION_POINTERS epointers, HANDLE hEvent)
|
||||||
ret = CreateProcessA(NULL, cmdline, NULL, NULL, TRUE, 0, env, NULL, &startup, &info);
|
ret = CreateProcessA(NULL, cmdline, NULL, NULL, TRUE, 0, env, NULL, &startup, &info);
|
||||||
FreeEnvironmentStringsA( env );
|
FreeEnvironmentStringsA( env );
|
||||||
|
|
||||||
if (ret) WaitForSingleObject(hEvent, INFINITE); /* wait for debugger to come up... */
|
if (ret)
|
||||||
|
{
|
||||||
|
/* wait for debugger to come up... */
|
||||||
|
HANDLE handles[2];
|
||||||
|
CloseHandle(info.hThread);
|
||||||
|
handles[0]=hEvent;
|
||||||
|
handles[1]=info.hProcess;
|
||||||
|
WaitForMultipleObjects(2, handles, FALSE, INFINITE);
|
||||||
|
CloseHandle(info.hProcess);
|
||||||
|
}
|
||||||
else ERR("Couldn't start debugger (%s) (%d)\n"
|
else ERR("Couldn't start debugger (%s) (%d)\n"
|
||||||
"Read the Wine Developers Guide on how to set up winedbg or another debugger\n",
|
"Read the Wine Developers Guide on how to set up winedbg or another debugger\n",
|
||||||
debugstr_a(cmdline), GetLastError());
|
debugstr_a(cmdline), GetLastError());
|
||||||
|
|
Loading…
Reference in New Issue