aboutsummaryrefslogtreecommitdiffstats
path: root/src/emacs.c
diff options
context:
space:
mode:
authorJim Blandy <[email protected]>1993-02-23 14:18:00 +0000
committerJim Blandy <[email protected]>1993-02-23 14:18:00 +0000
commit8090eb098eb9def919c2f6d7374fddbcd3442e6e (patch)
tree12443a557569b70d1594a9a6e6f111abc5645c2f /src/emacs.c
parent2471a2815be559b063401028203f08b2b365979b (diff)
* emacs.c (fatal_error_signal): Unblock the signal before we try
to deliver it to ourselves. #include "syssignal.h" to get the right definitions.
Diffstat (limited to 'src/emacs.c')
-rw-r--r--src/emacs.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 4dcdbc328e..b33bb7fa44 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -50,6 +50,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "intervals.h"
#include "systty.h"
+#include "syssignal.h"
#ifndef O_RDWR
#define O_RDWR 2
@@ -125,17 +126,21 @@ fatal_error_signal (sig)
signal (sig, SIG_DFL);
/* If fatal error occurs in code below, avoid infinite recursion. */
- if (fatal_error_in_progress)
- kill (getpid (), fatal_error_code);
-
- fatal_error_in_progress = 1;
+ if (! fatal_error_in_progress)
+ {
+ 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 */
}