[gimp] libgimp: properly catch SIGABRT signal.



commit c46211190fe4a4a74fec09dd3209fef89f2de5a8
Author: Jehan <jehan girinstud io>
Date:   Wed Apr 4 04:03:42 2018 +0200

    libgimp: properly catch SIGABRT signal.
    
    SIGABRT was in the switch list in gimp_plugin_sigfatal_handler(), but it
    had not been properly handled with gimp_signal_private(), making this
    switch case useless. Fix this oversight, and while doing so, move it in
    the "fatal error" list for which we may generate stack traces, similarly
    to core signal handling. Indeed this signal can definitely happen during
    various kinds of common bugs and needs to be debugged.

 libgimp/gimp.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libgimp/gimp.c b/libgimp/gimp.c
index 5905f5e..789bd70 100644
--- a/libgimp/gimp.c
+++ b/libgimp/gimp.c
@@ -486,9 +486,11 @@ gimp_main (const GimpPlugInInfo *info,
   gimp_signal_private (SIGHUP,  gimp_plugin_sigfatal_handler, 0);
   gimp_signal_private (SIGINT,  gimp_plugin_sigfatal_handler, 0);
   gimp_signal_private (SIGQUIT, gimp_plugin_sigfatal_handler, 0);
+  gimp_signal_private (SIGTERM, gimp_plugin_sigfatal_handler, 0);
+
+  gimp_signal_private (SIGABRT, gimp_plugin_sigfatal_handler, 0);
   gimp_signal_private (SIGBUS,  gimp_plugin_sigfatal_handler, 0);
   gimp_signal_private (SIGSEGV, gimp_plugin_sigfatal_handler, 0);
-  gimp_signal_private (SIGTERM, gimp_plugin_sigfatal_handler, 0);
   gimp_signal_private (SIGFPE,  gimp_plugin_sigfatal_handler, 0);
 
   /* Ignore SIGPIPE from crashing Gimp */
@@ -1907,11 +1909,11 @@ gimp_plugin_sigfatal_handler (gint sig_num)
     case SIGHUP:
     case SIGINT:
     case SIGQUIT:
-    case SIGABRT:
     case SIGTERM:
       g_printerr ("%s terminated: %s\n", progname, g_strsignal (sig_num));
       break;
 
+    case SIGABRT:
     case SIGBUS:
     case SIGSEGV:
     case SIGFPE:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]