Make the signal handler hint more generic.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 24 Mar 2015 14:36:36 -0400
changeset 94350979c3e31211
parent 9434 0a695c9c3c71
child 9436 0af69dab9bb6
Make the signal handler hint more generic.
include/SDL_hints.h
src/events/SDL_quit.c
     1.1 --- a/include/SDL_hints.h	Tue Mar 24 14:29:25 2015 -0400
     1.2 +++ b/include/SDL_hints.h	Tue Mar 24 14:36:36 2015 -0400
     1.3 @@ -547,16 +547,16 @@
     1.4  #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT   "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
     1.5  
     1.6  /**
     1.7 - *  \brief Tell SDL not to handle SIGINT.
     1.8 + *  \brief Tell SDL not to catch the SIGINT or SIGTERM signals.
     1.9   *
    1.10   * This hint only applies to Unix-like platforms.
    1.11   *
    1.12   * The variable can be set to the following values:
    1.13 - *   "0"       - SDL will install a SIGINT handler, and when it catches the
    1.14 - *               signal, conver it into an SDL_QUIT event.
    1.15 - *   "1"       - SDL will not install a SIGINT handler.
    1.16 + *   "0"       - SDL will install a SIGINT and SIGTERM handler, and when it
    1.17 + *               catches a signal, convert it into an SDL_QUIT event.
    1.18 + *   "1"       - SDL will not install a signal handler at all.
    1.19   */
    1.20 -#define SDL_HINT_DISABLE_SIGINT_HANDLER   "SDL_DISABLE_SIGINT_HANDLER"
    1.21 +#define SDL_HINT_NO_SIGNAL_HANDLERS   "SDL_NO_SIGNAL_HANDLERS"
    1.22  
    1.23  /**
    1.24   *  \brief  An enumeration of hint priorities
     2.1 --- a/src/events/SDL_quit.c	Tue Mar 24 14:29:25 2015 -0400
     2.2 +++ b/src/events/SDL_quit.c	Tue Mar 24 14:36:36 2015 -0400
     2.3 @@ -49,7 +49,7 @@
     2.4  int
     2.5  SDL_QuitInit(void)
     2.6  {
     2.7 -    const char *hint = SDL_GetHint(SDL_HINT_DISABLE_SIGINT_HANDLER);
     2.8 +    const char *hint = SDL_GetHint(SDL_HINT_NO_SIGNAL_HANDLERS);
     2.9      disable_signals = hint && (SDL_atoi(hint) == 1);
    2.10      if (disable_signals) {
    2.11          return 0;