mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-20 20:29:10 +00:00
Fix deadlock if plCrashHandler is not running
Only wait for the crash server to do its job if it's attached. Silent failures are evil, but it's better than hanging forever.
This commit is contained in:
@ -108,10 +108,11 @@ void plCrashSrv::IHandleCrash()
|
||||
|
||||
void plCrashSrv::HandleCrash()
|
||||
{
|
||||
#ifdef HS_BUILD_FOR_WIN32
|
||||
if (!fLink)
|
||||
FATAL("plCrashMemLink is nil!");
|
||||
fLink->fSrvReady = true; // mark us as ready to receive crashes
|
||||
|
||||
#ifdef HS_BUILD_FOR_WIN32
|
||||
// In Win32 land we have to hackily handle the client process exiting, so we'll wait on both
|
||||
// the crashed semaphore and the client process...
|
||||
HANDLE hack[2] = { fLink->fClientProcess, fCrashed->GetHandle() };
|
||||
@ -119,8 +120,6 @@ void plCrashSrv::HandleCrash()
|
||||
hsAssert(result != WAIT_FAILED, "WaitForMultipleObjects failed");
|
||||
#else
|
||||
fCrashed->Wait();
|
||||
if (!fLink)
|
||||
FATAL("plCrashMemLink is nil!");
|
||||
#endif
|
||||
if (fLink->fCrashed)
|
||||
IHandleCrash();
|
||||
|
Reference in New Issue
Block a user