mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-11 06:43:56 +00:00
[client] perform proper shutdown on SIGTERM
This commit is contained in:
parent
972ff93e6c
commit
6f77ba8aea
2 changed files with 6 additions and 3 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
a12-155-g8cedad8241+1
|
a12-157-g972ff93e6c+1
|
|
@ -845,11 +845,13 @@ int eventFilter(void * userdata, SDL_Event * event)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void intHandler(int signal)
|
void int_handler(int signal)
|
||||||
{
|
{
|
||||||
switch(signal)
|
switch(signal)
|
||||||
{
|
{
|
||||||
case SIGINT:
|
case SIGINT:
|
||||||
|
case SIGTERM:
|
||||||
|
DEBUG_INFO("Caught signal, shutting down...");
|
||||||
state.running = false;
|
state.running = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -986,7 +988,8 @@ int run()
|
||||||
|
|
||||||
// override SDL's SIGINIT handler so that we can tell the difference between
|
// 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
|
// 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;
|
LG_RendererParams lgrParams;
|
||||||
lgrParams.showFPS = params.showFPS;
|
lgrParams.showFPS = params.showFPS;
|
||||||
|
|
Loading…
Reference in a new issue