From 295f8b7eb98498afd01bcf02ca16bfb4212caace Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 4 Oct 2001 10:02:59 +0000 Subject: [PATCH] (fatal_error_signal_hook): New variable. (fatal_error_signal): Call that function. --- src/emacs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/emacs.c b/src/emacs.c index 5e00e8f4e54..7ac6c31be01 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -292,6 +292,12 @@ int fatal_error_code; /* Nonzero if handling a fatal error already */ int fatal_error_in_progress; +/* If non-null, call this function from fata_error_signal before + committing suicide. */ + +void (*fatal_error_signal_hook) P_ ((void)); + + #ifdef SIGUSR1 SIGTYPE handle_USR1_signal (sig) @@ -351,6 +357,10 @@ fatal_error_signal (sig) #ifndef MSDOS sigunblock (sigmask (fatal_error_code)); #endif + + if (fatal_error_signal_hook) + fatal_error_signal_hook (); + kill (getpid (), fatal_error_code); #endif /* not VMS */ } -- 2.39.5