I await the rise of AltimitOS because seriously, fuck this nonsense

This commit is contained in:
Alam Arias 2015-01-10 02:36:05 +00:00 committed by Alam Ed Arias
parent 8bee6bef59
commit 0c106a4ccc
1 changed files with 19 additions and 16 deletions

View File

@ -312,9 +312,9 @@ FUNCNORETURN static ATTRNORETURN void signal_handler(INT32 num)
switch (num) switch (num)
{ {
case SIGINT: // case SIGINT:
sigmsg = "SIGINT - interrupted"; // sigmsg = "SIGINT - interrupted";
break; // break;
case SIGILL: case SIGILL:
sigmsg = "SIGILL - illegal instruction - invalid function image"; sigmsg = "SIGILL - illegal instruction - invalid function image";
break; break;
@ -324,14 +324,12 @@ FUNCNORETURN static ATTRNORETURN void signal_handler(INT32 num)
case SIGSEGV: case SIGSEGV:
sigmsg = "SIGSEGV - segment violation"; sigmsg = "SIGSEGV - segment violation";
break; break;
case SIGTERM: // case SIGTERM:
sigmsg = "SIGTERM - Software termination signal from kill"; // sigmsg = "SIGTERM - Software termination signal from kill";
break; // break;
#if !(defined (__unix_) || defined (UNIXCOMMON)) // case SIGBREAK:
case SIGBREAK: // sigmsg = "SIGBREAK - Ctrl-Break sequence";
sigmsg = "SIGBREAK - Ctrl-Break sequence"; // break;
break;
#endif
case SIGABRT: case SIGABRT:
sigmsg = "SIGABRT - abnormal termination triggered by abort call"; sigmsg = "SIGABRT - abnormal termination triggered by abort call";
break; break;
@ -743,11 +741,18 @@ static inline void I_ShutdownConsole(void){}
void I_StartupKeyboard (void) void I_StartupKeyboard (void)
{ {
#if !defined (DC) #if !defined (DC)
#ifdef SIGINT
signal(SIGINT , quit_handler);
#endif
#ifdef SIGBREAK
signal(SIGBREAK , quit_handler);
#endif
#ifdef SIGTERM
signal(SIGTERM , quit_handler);
#endif
// If these defines don't exist, // If these defines don't exist,
// then compilation would have failed above us... // then compilation would have failed above us...
signal(SIGINT , quit_handler);
signal(SIGBREAK , quit_handler);
signal(SIGTERM , quit_handler);
signal(SIGILL , signal_handler); signal(SIGILL , signal_handler);
signal(SIGSEGV , signal_handler); signal(SIGSEGV , signal_handler);
signal(SIGABRT , signal_handler); signal(SIGABRT , signal_handler);
@ -2332,9 +2337,7 @@ static boolean shutdowning = false;
void I_Error(const char *error, ...) void I_Error(const char *error, ...)
{ {
va_list argptr; va_list argptr;
#if (defined (MAC_ALERT) || defined (_WIN32) || (defined (_WIN32_WCE) && !defined (__GNUC__))) && !defined (_XBOX)
char buffer[8192]; char buffer[8192];
#endif
// recursive error detecting // recursive error detecting
if (shutdowning) if (shutdowning)