Skip to content
Permalink
Browse files

Check sa_sigaction member of struct sigaction

  • Loading branch information
pmandin committed Jul 14, 2011
1 parent 5cc87f9 commit 8ac7e0f418044d2079e7cf11fba8391b75640e98

File 2 of 2 in 8ac7e0f

@@ -48,12 +48,20 @@ int SDL_QuitInit(void)
#ifdef HAVE_SIGACTION
struct sigaction action;
sigaction(SIGINT, NULL, &action);
# ifdef HAVE_SA_SIGACTION
if ( action.sa_handler == SIG_DFL && action.sa_sigaction == (void*)SIG_DFL ) {
# else
if ( action.sa_handler == SIG_DFL ) {
# endif
action.sa_handler = SDL_HandleSIG;
sigaction(SIGINT, &action, NULL);
}
sigaction(SIGTERM, NULL, &action);
# ifdef HAVE_SA_SIGACTION
if ( action.sa_handler == SIG_DFL && action.sa_sigaction == (void*)SIG_DFL ) {
# else
if ( action.sa_handler == SIG_DFL ) {
# endif
action.sa_handler = SDL_HandleSIG;
sigaction(SIGTERM, &action, NULL);
}

0 comments on commit 8ac7e0f

Please sign in to comment.