mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Properly print the backtrace and generate a core dump on both Windows/Unix
This commit is contained in:
parent
862af012cb
commit
01dfbcdbfe
4 changed files with 49 additions and 8 deletions
|
@ -715,7 +715,7 @@ char *Sys_ParseProtocolUri( const char *uri )
|
|||
Sys_SigHandler
|
||||
=================
|
||||
*/
|
||||
void Sys_SigHandler( int signal )
|
||||
void Sys_SigHandler( int signum )
|
||||
{
|
||||
static qboolean signalcaught = qfalse;
|
||||
|
||||
|
@ -727,7 +727,13 @@ void Sys_SigHandler( int signal )
|
|||
else
|
||||
{
|
||||
signalcaught = qtrue;
|
||||
Sys_PrintBackTrace();
|
||||
|
||||
printf("----\nBacktrace:\n");
|
||||
Sys_PrintBackTrace();
|
||||
printf("----\n");
|
||||
// Call the default signal handler to generate a core dump
|
||||
SIG_DFL(signum);
|
||||
|
||||
VM_Forced_Unload_Start();
|
||||
#ifndef DEDICATED
|
||||
CL_Shutdown(va("Received signal %d", signal), qtrue, qtrue);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue