diff options
author | Gerd Moellmann <gerd@gnu.org> | 2001-10-05 09:45:30 +0000 |
---|---|---|
committer | Gerd Moellmann <gerd@gnu.org> | 2001-10-05 09:45:30 +0000 |
commit | 4fab758d0bbda830bd39d895dc98f970150ba5bf (patch) | |
tree | 6852957a65f3d08100e3f2c59d5fe5d59e50b4e6 /src/emacs.c | |
parent | f35d5badef50cfed221dfb94bb5868af3607d39e (diff) | |
download | emacs-4fab758d0bbda830bd39d895dc98f970150ba5bf.tar.gz |
(fatal_error_signal_hook): New variable.
(fatal_error_signal): Call that function.
(Fdump_emacs_data, Fdump_emacs): Call check_pure_size.
Diffstat (limited to 'src/emacs.c')
-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; /* Nonzero if handling a fatal error already */ int fatal_error_in_progress; +/* If non-null, call this function from fata_error_signal before + committing suicide. */ + +void (*fatal_error_signal_hook) P_ ((void)); + + #ifdef SIGUSR1 SIGTYPE handle_USR1_signal (sig) @@ -351,6 +357,10 @@ fatal_error_signal (sig) #ifndef MSDOS sigunblock (sigmask (fatal_error_code)); #endif + + if (fatal_error_signal_hook) + fatal_error_signal_hook (); + kill (getpid (), fatal_error_code); #endif /* not VMS */ } @@ -1940,6 +1950,7 @@ This function exists on systems that use HAVE_SHM.") extern char my_edata[]; Lisp_Object tem; + check_pure_size (); CHECK_STRING (filename, 0); filename = Fexpand_file_name (filename, Qnil); @@ -1973,7 +1984,9 @@ You must run Emacs in batch mode in order to dump it.") extern char my_edata[]; Lisp_Object tem; Lisp_Object symbol; - int count = specpdl_ptr - specpdl; + int count = BINDING_STACK_SIZE (); + + check_pure_size (); if (! noninteractive) error ("Dumping Emacs works only in batch mode"); |