only add non-SIGILL signal handlers for non-quicklaunch builds

quicklaunch does not require signal handling and any pause() call will
impede obtaining crashdumps
devs/discomfitor/quicklaunch
Mike Blumenkrantz 5 years ago
parent 9c18cbc84b
commit abc802bd67
  1. 50
      src/bin/e_main.c
  2. 6
      src/bin/e_signals.c

@ -242,33 +242,33 @@ elm_main(int argc, char **argv)
if (!getenv("NOTIFY_SOCKET"))
{
TS("Signal Trap");
#ifndef HAVE_WAYLAND
action.sa_sigaction = e_sigseg_act;
action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGSEGV, &action, NULL);
action.sa_sigaction = e_sigill_act;
action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGILL, &action, NULL);
action.sa_sigaction = e_sigfpe_act;
action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGFPE, &action, NULL);
#ifndef HAVE_WAYLAND_ONLY
action.sa_sigaction = e_sigbus_act;
action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGBUS, &action, NULL);
action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGSEGV, &action, NULL);
#endif
action.sa_sigaction = e_sigabrt_act;
action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGABRT, &action, NULL);
TS("Signal Trap Done");
action.sa_sigaction = e_sigill_act;
action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGILL, &action, NULL);
#ifndef HAVE_WAYLAND
action.sa_sigaction = e_sigfpe_act;
action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGFPE, &action, NULL);
action.sa_sigaction = e_sigbus_act;
action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGBUS, &action, NULL);
action.sa_sigaction = e_sigabrt_act;
action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGABRT, &action, NULL);
#endif
TS("Signal Trap Done");
}
t = ecore_time_unix_get();

@ -68,10 +68,6 @@ _e_write_safe_int(int fd, const char *buf, size_t size)
static void
_e_crash(void)
{
#ifdef HAVE_WAYLAND
if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
return;
#endif
#ifndef HAVE_WAYLAND_ONLY
_e_x_composite_shutdown();
ecore_x_pointer_ungrab();
@ -100,7 +96,9 @@ e_sigill_act(int x EINA_UNUSED, siginfo_t *info EINA_UNUSED, void *data EINA_UNU
// by a SEGV.
kill(getpid(), SIGUSR1);
kill(getpid(), SIGSEGV);
#ifndef HAVE_WAYLAND
pause();
#endif
/* _e_x_composite_shutdown(); */
/* ecore_x_pointer_ungrab(); */
/* ecore_x_keyboard_ungrab(); */

Loading…
Cancel
Save