summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-02-07 13:36:12 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2018-02-07 13:55:20 -0500
commitabc802bd67ed4d6e91a8b3e9bea7980426d365e2 (patch)
treec91bd4ea5626740706009926e82a792b55722b70
parent9c18cbc84b36b72ee227b64cf738c4548119b987 (diff)
only add non-SIGILL signal handlers for non-quicklaunch buildsfeature/quicklaunchdevs/discomfitor/quicklaunch
quicklaunch does not require signal handling and any pause() call will impede obtaining crashdumps
-rw-r--r--src/bin/e_main.c50
-rw-r--r--src/bin/e_signals.c6
2 files changed, 27 insertions, 29 deletions
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index f055f24b6..65e74cb55 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -242,33 +242,33 @@ elm_main(int argc, char **argv)
242 if (!getenv("NOTIFY_SOCKET")) 242 if (!getenv("NOTIFY_SOCKET"))
243 { 243 {
244 TS("Signal Trap"); 244 TS("Signal Trap");
245#ifndef HAVE_WAYLAND
245 action.sa_sigaction = e_sigseg_act; 246 action.sa_sigaction = e_sigseg_act;
246 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO; 247 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
247 sigemptyset(&action.sa_mask); 248 sigemptyset(&action.sa_mask);
248 sigaction(SIGSEGV, &action, NULL); 249 sigaction(SIGSEGV, &action, NULL);
249
250 action.sa_sigaction = e_sigill_act;
251 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
252 sigemptyset(&action.sa_mask);
253 sigaction(SIGILL, &action, NULL);
254
255 action.sa_sigaction = e_sigfpe_act;
256 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
257 sigemptyset(&action.sa_mask);
258 sigaction(SIGFPE, &action, NULL);
259
260#ifndef HAVE_WAYLAND_ONLY
261 action.sa_sigaction = e_sigbus_act;
262 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
263 sigemptyset(&action.sa_mask);
264 sigaction(SIGBUS, &action, NULL);
265#endif 250#endif
266 251 action.sa_sigaction = e_sigill_act;
267 action.sa_sigaction = e_sigabrt_act; 252 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
268 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO; 253 sigemptyset(&action.sa_mask);
269 sigemptyset(&action.sa_mask); 254 sigaction(SIGILL, &action, NULL);
270 sigaction(SIGABRT, &action, NULL); 255#ifndef HAVE_WAYLAND
271 TS("Signal Trap Done"); 256 action.sa_sigaction = e_sigfpe_act;
257 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
258 sigemptyset(&action.sa_mask);
259 sigaction(SIGFPE, &action, NULL);
260
261 action.sa_sigaction = e_sigbus_act;
262 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
263 sigemptyset(&action.sa_mask);
264 sigaction(SIGBUS, &action, NULL);
265
266 action.sa_sigaction = e_sigabrt_act;
267 action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
268 sigemptyset(&action.sa_mask);
269 sigaction(SIGABRT, &action, NULL);
270#endif
271 TS("Signal Trap Done");
272 } 272 }
273 273
274 t = ecore_time_unix_get(); 274 t = ecore_time_unix_get();
diff --git a/src/bin/e_signals.c b/src/bin/e_signals.c
index 4d6f9e5dd..5b66433be 100644
--- a/src/bin/e_signals.c
+++ b/src/bin/e_signals.c
@@ -68,10 +68,6 @@ _e_write_safe_int(int fd, const char *buf, size_t size)
68static void 68static void
69_e_crash(void) 69_e_crash(void)
70{ 70{
71#ifdef HAVE_WAYLAND
72 if (e_comp->comp_type == E_PIXMAP_TYPE_WL)
73 return;
74#endif
75#ifndef HAVE_WAYLAND_ONLY 71#ifndef HAVE_WAYLAND_ONLY
76 _e_x_composite_shutdown(); 72 _e_x_composite_shutdown();
77 ecore_x_pointer_ungrab(); 73 ecore_x_pointer_ungrab();
@@ -100,7 +96,9 @@ e_sigill_act(int x EINA_UNUSED, siginfo_t *info EINA_UNUSED, void *data EINA_UNU
100 // by a SEGV. 96 // by a SEGV.
101 kill(getpid(), SIGUSR1); 97 kill(getpid(), SIGUSR1);
102 kill(getpid(), SIGSEGV); 98 kill(getpid(), SIGSEGV);
99#ifndef HAVE_WAYLAND
103 pause(); 100 pause();
101#endif
104 /* _e_x_composite_shutdown(); */ 102 /* _e_x_composite_shutdown(); */
105 /* ecore_x_pointer_ungrab(); */ 103 /* ecore_x_pointer_ungrab(); */
106 /* ecore_x_keyboard_ungrab(); */ 104 /* ecore_x_keyboard_ungrab(); */