diff options
| author | Jim Blandy | 1993-02-23 14:18:00 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-02-23 14:18:00 +0000 |
| commit | 8090eb098eb9def919c2f6d7374fddbcd3442e6e (patch) | |
| tree | 12443a557569b70d1594a9a6e6f111abc5645c2f /src | |
| parent | 2471a2815be559b063401028203f08b2b365979b (diff) | |
| download | emacs-8090eb098eb9def919c2f6d7374fddbcd3442e6e.tar.gz emacs-8090eb098eb9def919c2f6d7374fddbcd3442e6e.zip | |
* 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')
| -rw-r--r-- | src/emacs.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/emacs.c b/src/emacs.c index 4dcdbc328e4..b33bb7fa447 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -50,6 +50,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 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 |
| @@ -125,17 +126,21 @@ fatal_error_signal (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 | } |