From dd533981a06c5d9bafa7cb0164299feacb059cb0 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 13 Nov 2004 17:39:26 +0000 Subject: [PATCH] Added an option to prevent restarting. Users might object to always having it reset. Plus, if a user can get a crash, we can allow windows to let us know where abouts. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@425 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/sv_sys_win.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/engine/server/sv_sys_win.c b/engine/server/sv_sys_win.c index 9915fa88d..17c0d4932 100644 --- a/engine/server/sv_sys_win.c +++ b/engine/server/sv_sys_win.c @@ -641,7 +641,7 @@ void WINAPI StartQuakeServerService (DWORD argc, LPTSTR *argv) { printf(" [MY_SERVICE] RegisterServiceCtrlHandler failed %d\n", GetLastError()); return; - } + } RegOpenKey(HKEY_LOCAL_MACHINE, "SOFTWARE\\FTE", &hk); @@ -703,14 +703,6 @@ SERVICE_TABLE_ENTRY DispatchTable[] = qboolean NET_Sleep(int msec, qboolean stdinissocket); int main (int argc, char **argv) { -#ifndef _DEBUG - { - signal (SIGFPE, Signal_Error_Handler); - signal (SIGILL, Signal_Error_Handler); - signal (SIGSEGV, Signal_Error_Handler); - } -#endif - #ifdef USESERVICE if (StartServiceCtrlDispatcher( DispatchTable)) { @@ -731,6 +723,15 @@ int main (int argc, char **argv) return true; } #endif + +#ifndef _DEBUG + if (COM_CheckParm("-noreset")) + { + signal (SIGFPE, Signal_Error_Handler); + signal (SIGILL, Signal_Error_Handler); + signal (SIGSEGV, Signal_Error_Handler); + } +#endif StartQuakeServer(); ServerMainLoop();