int data;
} focus_idle_event_t;
-void _system_signal_handler(int signo)
+void _system_signal_handler(int signo, siginfo_t *siginfo, void *context)
{
int ret = MM_ERROR_NONE;
sigset_t old_mask, all_mask;
switch (signo) {
case SIGINT:
- sigaction(SIGINT, &system_int_old_action, NULL);
- raise( signo);
+ if (system_int_old_action.sa_sigaction)
+ system_int_old_action.sa_sigaction(signo, siginfo, context);
+ else
+ sigaction(signo, &system_int_old_action, NULL);
break;
case SIGABRT:
- sigaction(SIGABRT, &system_abrt_old_action, NULL);
- raise( signo);
+ if (system_abrt_old_action.sa_sigaction)
+ system_abrt_old_action.sa_sigaction(signo, siginfo, context);
+ else
+ sigaction(signo, &system_abrt_old_action, NULL);
break;
case SIGSEGV:
- sigaction(SIGSEGV, &system_segv_old_action, NULL);
- raise( signo);
+ if (system_segv_old_action.sa_sigaction)
+ system_segv_old_action.sa_sigaction(signo, siginfo, context);
+ else
+ sigaction(signo, &system_segv_old_action, NULL);
break;
case SIGTERM:
- sigaction(SIGTERM, &system_term_old_action, NULL);
- raise( signo);
+ if (system_term_old_action.sa_sigaction)
+ system_term_old_action.sa_sigaction(signo, siginfo, context);
+ else
+ sigaction(signo, &system_term_old_action, NULL);
break;
case SIGSYS:
- sigaction(SIGSYS, &system_sys_old_action, NULL);
- raise( signo);
+ if (system_sys_old_action.sa_sigaction)
+ system_sys_old_action.sa_sigaction(signo, siginfo, context);
+ else
+ sigaction(signo, &system_sys_old_action, NULL);
break;
case SIGXCPU:
- sigaction(SIGXCPU, &system_xcpu_old_action, NULL);
- raise( signo);
+ if (system_xcpu_old_action.sa_sigaction)
+ system_xcpu_old_action.sa_sigaction(signo, siginfo, context);
+ else
+ sigaction(signo, &system_xcpu_old_action, NULL);
break;
default:
break;
struct sigaction system_action;
system_action.sa_handler = _system_signal_handler;
- system_action.sa_flags = SA_NOCLDSTOP;
+ system_action.sa_flags = SA_NOCLDSTOP | SA_SIGINFO;
sigemptyset(&system_action.sa_mask);