mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 13:37:22 +00:00
[client] perform proper shutdown on SIGTERM
This commit is contained in:
parent
972ff93e6c
commit
6f77ba8aea
@ -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 New Issue
Block a user