From 67c2a6990ce044518dcd210ce7f47ef0bddfa3ec Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 4 Jun 2012 10:31:56 +0200 Subject: [PATCH] get rid of use of exit() --- sys_linux.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys_linux.c b/sys_linux.c index 7cb28b6a..6e6afded 100644 --- a/sys_linux.c +++ b/sys_linux.c @@ -153,10 +153,10 @@ void Sys_InitConsole (void) # include # endif #endif -static void anticheat_init(char **envp) +static qboolean anticheat_init(char **envp) { #ifdef ANTICHEAT -#define FAIL exit(42) +#define FAIL return false // anti LD_PRELOAD // note that we're using envp here, so one doesn't simply hook into getenv() @@ -254,11 +254,14 @@ static void anticheat_init(char **envp) } # endif #endif + + return true; } int main (int argc, char **argv, char **envp) { - anticheat_init(envp); + if(!anticheat_init(envp)) + return 42; signal(SIGFPE, SIG_IGN); -- 2.39.2