changeset 1945:b07c27b4dca7

* emacs.c (fatal_error_signal): Unblock the signal before we try to deliver it to ourselves. #include "syssignal.h" to get the right definitions.
author Jim Blandy <jimb@redhat.com>
date Tue, 23 Feb 1993 14:18:00 +0000
parents 687179cefbe0
children 05297a5a8238
files src/emacs.c
diffstat 1 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/emacs.c	Tue Feb 23 14:17:11 1993 +0000
+++ b/src/emacs.c	Tue Feb 23 14:18:00 1993 +0000
@@ -50,6 +50,7 @@
 #include "intervals.h"
 
 #include "systty.h"
+#include "syssignal.h"
 
 #ifndef O_RDWR
 #define O_RDWR 2
@@ -125,17 +126,21 @@
   signal (sig, SIG_DFL);
 
   /* If fatal error occurs in code below, avoid infinite recursion.  */
-  if (fatal_error_in_progress)
-    kill (getpid (), fatal_error_code);
+  if (! fatal_error_in_progress)
+    {
+      fatal_error_in_progress = 1;
 
-  fatal_error_in_progress = 1;
-
-  shut_down_emacs (sig);
+      shut_down_emacs (sig);
+    }
 
 #ifdef VMS
   LIB$STOP (SS$_ABORT);
 #else
-  /* Signal the same code; this time it will really be fatal.  */
+  /* Signal the same code; this time it will really be fatal.
+     Remember that since we're in a signal handler, the signal we're
+     going to send is probably blocked, so we have to unblock it if we
+     want to really receive it.  */
+  sigblock(SIGEMPTYMASK);
   kill (getpid (), fatal_error_code);
 #endif /* not VMS */
 }