From: Rudolf Polzer Date: Mon, 4 Jun 2012 08:31:56 +0000 (+0200) Subject: get rid of use of exit() X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=67c2a6990ce044518dcd210ce7f47ef0bddfa3ec;p=xonotic%2Fdarkplaces.git get rid of use of exit() --- 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);