comparison src/emacs.c @ 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 2ed00cbd9e53
children 454228f1c526
comparison
equal deleted inserted replaced
1944:687179cefbe0 1945:b07c27b4dca7
48 #include "lisp.h" 48 #include "lisp.h"
49 #include "commands.h" 49 #include "commands.h"
50 #include "intervals.h" 50 #include "intervals.h"
51 51
52 #include "systty.h" 52 #include "systty.h"
53 #include "syssignal.h"
53 54
54 #ifndef O_RDWR 55 #ifndef O_RDWR
55 #define O_RDWR 2 56 #define O_RDWR 2
56 #endif 57 #endif
57 58
123 { 124 {
124 fatal_error_code = sig; 125 fatal_error_code = sig;
125 signal (sig, SIG_DFL); 126 signal (sig, SIG_DFL);
126 127
127 /* If fatal error occurs in code below, avoid infinite recursion. */ 128 /* If fatal error occurs in code below, avoid infinite recursion. */
128 if (fatal_error_in_progress) 129 if (! fatal_error_in_progress)
129 kill (getpid (), fatal_error_code); 130 {
130 131 fatal_error_in_progress = 1;
131 fatal_error_in_progress = 1; 132
132 133 shut_down_emacs (sig);
133 shut_down_emacs (sig); 134 }
134 135
135 #ifdef VMS 136 #ifdef VMS
136 LIB$STOP (SS$_ABORT); 137 LIB$STOP (SS$_ABORT);
137 #else 138 #else
138 /* Signal the same code; this time it will really be fatal. */ 139 /* Signal the same code; this time it will really be fatal.
140 Remember that since we're in a signal handler, the signal we're
141 going to send is probably blocked, so we have to unblock it if we
142 want to really receive it. */
143 sigblock(SIGEMPTYMASK);
139 kill (getpid (), fatal_error_code); 144 kill (getpid (), fatal_error_code);
140 #endif /* not VMS */ 145 #endif /* not VMS */
141 } 146 }
142 147
143 /* Code for dealing with Lisp access to the Unix command line */ 148 /* Code for dealing with Lisp access to the Unix command line */