[gimp] app: add SIGABRT to be handled by gimp_fatal_error().



commit 07e8ce3604b756a359fdbe3d0cdbc338d3f98512
Author: Jehan <jehan girinstud io>
Date:   Sun Jan 28 18:21:03 2018 +0100

    app: add SIGABRT to be handled by gimp_fatal_error().
    
    SIGABRT is definitely a fatal error, at least in GIMP context. It is
    used by g_assert() and more generally by abort().
    
    Actually I am a bit unsure about the difference of gimp_terminate() and
    gimp_fatal_error(). The former mostly depends on whether we used
    --debug-handlers or not, which reads "Enable non-fatal debugging signal
    handlers". But the way we handle them, the list of signals handled by
    gimp_terminate() seem to always end up fatal as well, anyway. So either
    we should *really* make them non-fatal (I could imagine that SIGTERM or
    SIGINT indeed could be better handled for instance), or we should just
    get rid of this terminate/fatal_error differentiation which seems
    totally artificial and non-existing in the current code.

 app/signals.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/signals.c b/app/signals.c
index c70748c..54ea9f6 100644
--- a/app/signals.c
+++ b/app/signals.c
@@ -99,10 +99,10 @@ gimp_init_signal_handlers (gchar **backtrace_file)
   gimp_signal_private (SIGHUP,  gimp_sigfatal_handler, 0);
   gimp_signal_private (SIGINT,  gimp_sigfatal_handler, 0);
   gimp_signal_private (SIGQUIT, gimp_sigfatal_handler, 0);
-  gimp_signal_private (SIGABRT, gimp_sigfatal_handler, 0);
   gimp_signal_private (SIGTERM, gimp_sigfatal_handler, 0);
 
   /* these are handled by gimp_fatal_error() */
+  gimp_signal_private (SIGABRT, gimp_sigfatal_handler, 0);
   gimp_signal_private (SIGBUS,  gimp_sigfatal_handler, 0);
   gimp_signal_private (SIGSEGV, gimp_sigfatal_handler, 0);
   gimp_signal_private (SIGFPE,  gimp_sigfatal_handler, 0);
@@ -150,11 +150,11 @@ gimp_sigfatal_handler (gint sig_num)
     case SIGHUP:
     case SIGINT:
     case SIGQUIT:
-    case SIGABRT:
     case SIGTERM:
       gimp_terminate (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]