X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fsave.lisp;h=7f0abb02fe7741e7788d65e19752304730ab70e6;hb=b1de52969f584c63d43fb35da4a8a6a4e0e619f0;hp=b61733d897968e497609abb157cafacc19a72dc0;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/code/save.lisp b/src/code/save.lisp index b61733d..7f0abb0 100644 --- a/src/code/save.lisp +++ b/src/code/save.lisp @@ -14,9 +14,6 @@ ;;;; files for more information. (in-package "SB!IMPL") - -(file-comment - "$Header$") (defvar *before-save-initializations* nil #!+sb-doc @@ -42,7 +39,7 @@ ;;; image to make a running Lisp, the memory never gets reclaimed. ;;; (But with the PURIFY option it seems to work OK.) (defun save-lisp-and-die (core-file-name &key - (toplevel #'toplevel) + (toplevel #'toplevel-init) (purify nil) (root-structures ()) (environment-name "auxiliary")) @@ -93,14 +90,11 @@ (dolist (f *before-save-initializations*) (funcall f)) (flet ((restart-lisp () - (sb!unix:unix-exit - (catch '%end-of-the-world - (reinit) - ;; FIXME: Wouldn't it be more correct to do this running - ;; backwards through the list, instead of forwards? - (dolist (f *after-save-initializations*) - (funcall f)) - (funcall toplevel))))) + (handling-end-of-the-world + (reinit) + (dolist (f *after-save-initializations*) + (funcall f)) + (funcall toplevel)))) ;; FIXME: Perhaps WITHOUT-GCING should be wrapped around the ;; LET as well, to avoid the off chance of an interrupt triggering ;; GC and making our saved RESTART-LISP address invalid?