21 #include "../SDL_internal.h" 55 struct sigaction action;
56 sigaction(SIGINT,
NULL, &action);
57 #ifdef HAVE_SA_SIGACTION 58 if ( action.sa_handler == SIG_DFL && action.sa_sigaction == (
void*)SIG_DFL ) {
60 if ( action.sa_handler == SIG_DFL ) {
63 sigaction(SIGINT, &action,
NULL);
65 sigaction(SIGTERM,
NULL, &action);
67 #ifdef HAVE_SA_SIGACTION 68 if ( action.sa_handler == SIG_DFL && action.sa_sigaction == (
void*)SIG_DFL ) {
70 if ( action.sa_handler == SIG_DFL ) {
73 sigaction(SIGTERM, &action,
NULL);
76 void (*ohandler) (int);
80 if (ohandler != SIG_DFL)
81 signal(SIGINT, ohandler);
83 if (ohandler != SIG_DFL)
84 signal(SIGTERM, ohandler);
105 #ifdef HAVE_SIGACTION 106 struct sigaction action;
107 sigaction(SIGINT,
NULL, &action);
109 action.sa_handler = SIG_DFL;
110 sigaction(SIGINT, &action,
NULL);
112 sigaction(SIGTERM,
NULL, &action);
114 action.sa_handler = SIG_DFL;
115 sigaction(SIGTERM, &action,
NULL);
118 void (*ohandler) (int);
120 ohandler = signal(SIGINT, SIG_DFL);
122 signal(SIGINT, ohandler);
123 ohandler = signal(SIGTERM, SIG_DFL);
125 signal(SIGTERM, ohandler);
static void SDL_HandleSIG(int sig)
static SDL_bool disable_signals
static SDL_bool send_quit_pending
void SDL_SendPendingQuit(void)
static void SDL_QuitQuit_Internal(void)
#define SDL_assert(condition)
SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char const char SDL_SCANF_FORMAT_STRING const char return SDL_ThreadFunction const char void return Uint32 return Uint32 void
#define SDL_HINT_NO_SIGNAL_HANDLERS
Tell SDL not to catch the SIGINT or SIGTERM signals.
int SDL_SendAppEvent(SDL_EventType eventType)
static int SDL_QuitInit_Internal(void)