aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-10-05 09:45:30 +0000
committerGerd Moellmann2001-10-05 09:45:30 +0000
commit4fab758d0bbda830bd39d895dc98f970150ba5bf (patch)
tree6852957a65f3d08100e3f2c59d5fe5d59e50b4e6
parentf35d5badef50cfed221dfb94bb5868af3607d39e (diff)
downloademacs-4fab758d0bbda830bd39d895dc98f970150ba5bf.tar.gz
emacs-4fab758d0bbda830bd39d895dc98f970150ba5bf.zip
(fatal_error_signal_hook): New variable.
(fatal_error_signal): Call that function. (Fdump_emacs_data, Fdump_emacs): Call check_pure_size.
-rw-r--r--src/emacs.c15
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 */
293int fatal_error_in_progress; 293int fatal_error_in_progress;
294 294
295/* If non-null, call this function from fata_error_signal before
296 committing suicide. */
297
298void (*fatal_error_signal_hook) P_ ((void));
299
300
295#ifdef SIGUSR1 301#ifdef SIGUSR1
296SIGTYPE 302SIGTYPE
297handle_USR1_signal (sig) 303handle_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");