X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fsave.lisp;h=c3ebfb920b9d9534762f800f01a42a6ff7eea082;hb=30a7667ec095ac9b78a826c445b9af78c9c183ba;hp=709743c3b16bdfff91078049ac2842ed9ba39927;hpb=be6abfb75a76eb69a417ff09fd6b0f41e708f8c3;p=sbcl.git diff --git a/src/code/save.lisp b/src/code/save.lisp index 709743c..c3ebfb9 100644 --- a/src/code/save.lisp +++ b/src/code/save.lisp @@ -95,7 +95,7 @@ The save/load process changes the values of some global variables: This is reinitialized to reflect the working directory where the saved core is loaded. -SAVE-LISP-AND-DIE interacts with SB-ALIEN:LOAD-FOREIGN-OBJECT: see its +SAVE-LISP-AND-DIE interacts with SB-ALIEN:LOAD-SHARED-OBJECT: see its documentation for details. On threaded platforms only a single thread may remain running after @@ -126,9 +126,7 @@ sufficiently motivated to do lengthy fixes." (handling-end-of-the-world (reinit) #!+hpux (sb!sys:%primitive sb!vm::setup-return-from-lisp-stub) - (progn - (funcall toplevel) - (sb!ext:quit)))) + (funcall toplevel))) (foreign-bool (value) (if value 1 0)) (save-core (gc) @@ -162,7 +160,11 @@ sufficiently motivated to do lengthy fixes." ;; Compact the environment even though we're skipping the ;; other purification stages. (sb!kernel::compact-environment-aux "Auxiliary" 200) - (save-core t))))) + (save-core t))) + ;; Something went very wrong -- reinitialize to have a prayer + ;; of being able to report the error. + (reinit) + (error "Could not save core."))) (defun deinit () (call-hooks "save" *save-hooks*) @@ -173,4 +175,5 @@ sufficiently motivated to do lengthy fixes." (debug-deinit) (foreign-deinit) (stream-deinit) - (deinit-finalizers)) + (deinit-finalizers) + (drop-all-hash-caches))