diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/emacs.c b/src/emacs.c index 924eeee8cf9..7ac6c31be01 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -292,6 +292,12 @@ int fatal_error_code; | |||
| 292 | /* Nonzero if handling a fatal error already */ | 292 | /* Nonzero if handling a fatal error already */ |
| 293 | int fatal_error_in_progress; | 293 | int fatal_error_in_progress; |
| 294 | 294 | ||
| 295 | /* If non-null, call this function from fata_error_signal before | ||
| 296 | committing suicide. */ | ||
| 297 | |||
| 298 | void (*fatal_error_signal_hook) P_ ((void)); | ||
| 299 | |||
| 300 | |||
| 295 | #ifdef SIGUSR1 | 301 | #ifdef SIGUSR1 |
| 296 | SIGTYPE | 302 | SIGTYPE |
| 297 | handle_USR1_signal (sig) | 303 | handle_USR1_signal (sig) |
| @@ -351,6 +357,10 @@ fatal_error_signal (sig) | |||
| 351 | #ifndef MSDOS | 357 | #ifndef MSDOS |
| 352 | sigunblock (sigmask (fatal_error_code)); | 358 | sigunblock (sigmask (fatal_error_code)); |
| 353 | #endif | 359 | #endif |
| 360 | |||
| 361 | if (fatal_error_signal_hook) | ||
| 362 | fatal_error_signal_hook (); | ||
| 363 | |||
| 354 | kill (getpid (), fatal_error_code); | 364 | kill (getpid (), fatal_error_code); |
| 355 | #endif /* not VMS */ | 365 | #endif /* not VMS */ |
| 356 | } | 366 | } |
| @@ -1940,6 +1950,7 @@ This function exists on systems that use HAVE_SHM.") | |||
| 1940 | extern char my_edata[]; | 1950 | extern char my_edata[]; |
| 1941 | Lisp_Object tem; | 1951 | Lisp_Object tem; |
| 1942 | 1952 | ||
| 1953 | check_pure_size (); | ||
| 1943 | CHECK_STRING (filename, 0); | 1954 | CHECK_STRING (filename, 0); |
| 1944 | filename = Fexpand_file_name (filename, Qnil); | 1955 | filename = Fexpand_file_name (filename, Qnil); |
| 1945 | 1956 | ||
| @@ -1973,7 +1984,9 @@ You must run Emacs in batch mode in order to dump it.") | |||
| 1973 | extern char my_edata[]; | 1984 | extern char my_edata[]; |
| 1974 | Lisp_Object tem; | 1985 | Lisp_Object tem; |
| 1975 | Lisp_Object symbol; | 1986 | Lisp_Object symbol; |
| 1976 | int count = specpdl_ptr - specpdl; | 1987 | int count = BINDING_STACK_SIZE (); |
| 1988 | |||
| 1989 | check_pure_size (); | ||
| 1977 | 1990 | ||
| 1978 | if (! noninteractive) | 1991 | if (! noninteractive) |
| 1979 | error ("Dumping Emacs works only in batch mode"); | 1992 | error ("Dumping Emacs works only in batch mode"); |