|
|
@ -108,10 +108,11 @@ void plCrashSrv::IHandleCrash() |
|
|
|
|
|
|
|
|
|
|
|
void plCrashSrv::HandleCrash() |
|
|
|
void plCrashSrv::HandleCrash() |
|
|
|
{ |
|
|
|
{ |
|
|
|
#ifdef HS_BUILD_FOR_WIN32 |
|
|
|
|
|
|
|
if (!fLink) |
|
|
|
if (!fLink) |
|
|
|
FATAL("plCrashMemLink is nil!"); |
|
|
|
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
|
|
|
|
// 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...
|
|
|
|
// the crashed semaphore and the client process...
|
|
|
|
HANDLE hack[2] = { fLink->fClientProcess, fCrashed->GetHandle() }; |
|
|
|
HANDLE hack[2] = { fLink->fClientProcess, fCrashed->GetHandle() }; |
|
|
@ -119,8 +120,6 @@ void plCrashSrv::HandleCrash() |
|
|
|
hsAssert(result != WAIT_FAILED, "WaitForMultipleObjects failed"); |
|
|
|
hsAssert(result != WAIT_FAILED, "WaitForMultipleObjects failed"); |
|
|
|
#else |
|
|
|
#else |
|
|
|
fCrashed->Wait(); |
|
|
|
fCrashed->Wait(); |
|
|
|
if (!fLink) |
|
|
|
|
|
|
|
FATAL("plCrashMemLink is nil!"); |
|
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
if (fLink->fCrashed) |
|
|
|
if (fLink->fCrashed) |
|
|
|
IHandleCrash(); |
|
|
|
IHandleCrash(); |
|
|
|