diff --git a/VERSION b/VERSION index bb71f1ec..a3ee9c51 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -a12-155-g8cedad8241+1 \ No newline at end of file +a12-157-g972ff93e6c+1 \ No newline at end of file diff --git a/client/src/main.c b/client/src/main.c index 3496262d..d01e8aee 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -845,11 +845,13 @@ int eventFilter(void * userdata, SDL_Event * event) return 0; } -void intHandler(int signal) +void int_handler(int signal) { switch(signal) { case SIGINT: + case SIGTERM: + DEBUG_INFO("Caught signal, shutting down..."); state.running = false; break; } @@ -986,7 +988,8 @@ int run() // override SDL's SIGINIT handler so that we can tell the difference between // SIGINT and the user sending a close event, such as ALT+F4 - signal(SIGINT, intHandler); + signal(SIGINT , int_handler); + signal(SIGTERM, int_handler); LG_RendererParams lgrParams; lgrParams.showFPS = params.showFPS;