mirror of
https://github.com/dhewm/dhewm3.git
synced 2024-11-23 12:53:09 +00:00
Get rid of Sys_SetFatalError()
Unnecessary.
This commit is contained in:
parent
33c841ef4c
commit
d2b7eac843
4 changed files with 1 additions and 29 deletions
|
@ -721,7 +721,7 @@ void idCommonLocal::FatalError( const char *fmt, ... ) {
|
|||
cmdSystem->BufferCommandText( CMD_EXEC_NOW, "vid_restart partial windowed\n" );
|
||||
}
|
||||
|
||||
Sys_SetFatalError( errorMessage );
|
||||
Sys_Printf( "shutting down: %s\n", errorMessage );
|
||||
|
||||
Shutdown();
|
||||
|
||||
|
|
|
@ -64,8 +64,6 @@ const char *signames[] = {
|
|||
// "SIGTTOUT"
|
||||
};
|
||||
|
||||
static char fatalError[ 1024 ];
|
||||
|
||||
/*
|
||||
================
|
||||
Posix_ClearSigs
|
||||
|
@ -107,10 +105,6 @@ static void sig_handler( int signum, siginfo_t *info, void *context ) {
|
|||
// NOTE: see sigaction man page, could verbose the whole siginfo_t and print human readable si_code
|
||||
Sys_Printf( "signal caught: %s\nsi_code %d\n", strsignal( signum ), info->si_code );
|
||||
|
||||
if ( fatalError[ 0 ] ) {
|
||||
Sys_Printf( "Was in fatal error shutdown: %s\n", fatalError );
|
||||
}
|
||||
|
||||
Sys_Printf( "Trying to exit gracefully..\n" );
|
||||
|
||||
Posix_SetExit( signum );
|
||||
|
@ -127,8 +121,6 @@ void Posix_InitSigs( ) {
|
|||
struct sigaction action;
|
||||
int i;
|
||||
|
||||
fatalError[0] = '\0';
|
||||
|
||||
/* Set up the structure */
|
||||
action.sa_sigaction = sig_handler;
|
||||
sigemptyset( &action.sa_mask );
|
||||
|
@ -147,12 +139,3 @@ void Posix_InitSigs( ) {
|
|||
signal( SIGTTIN, SIG_IGN );
|
||||
signal( SIGTTOU, SIG_IGN );
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
Sys_SetFatalError
|
||||
==================
|
||||
*/
|
||||
void Sys_SetFatalError( const char *error ) {
|
||||
strncpy( fatalError, error, sizeof( fatalError ) );
|
||||
}
|
||||
|
|
|
@ -197,9 +197,6 @@ bool Sys_GetPath(sysPath_t type, idStr &path);
|
|||
// returns -1 if directory was not found (the list is cleared)
|
||||
int Sys_ListFiles( const char *directory, const char *extension, idList<class idStr> &list );
|
||||
|
||||
// know early if we are performing a fatal error shutdown so the error message doesn't get lost
|
||||
void Sys_SetFatalError( const char *error );
|
||||
|
||||
/*
|
||||
==============================================================
|
||||
|
||||
|
|
|
@ -784,11 +784,3 @@ void idSysLocal::StartProcess( const char *exePath, bool doexit ) {
|
|||
cmdSystem->BufferCommandText( CMD_EXEC_APPEND, "quit\n" );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
Sys_SetFatalError
|
||||
==================
|
||||
*/
|
||||
void Sys_SetFatalError( const char *error ) {
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue