X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftoplevel.lisp;h=4cc0b0c5810a5b10c4d007285cbd6b812f02cb97;hb=a01e7ac2e8a9f3afae8f759381a0829fceb5bfde;hp=eddb5f88010fc503d74ab7a38179545c54a945b2;hpb=77d46c398278c0bbe221722c21c01d47713cd878;p=sbcl.git diff --git a/src/code/toplevel.lisp b/src/code/toplevel.lisp index eddb5f8..4cc0b0c 100644 --- a/src/code/toplevel.lisp +++ b/src/code/toplevel.lisp @@ -76,7 +76,9 @@ command-line.") (with-unique-names (caught) `(let ((,caught (catch '%end-of-the-world (/show0 "inside CATCH '%END-OF-THE-WORLD") - ,@body))) + (unwind-protect + (progn ,@body) + (call-hooks "exit" *exit-hooks*))))) (/show0 "back from CATCH '%END-OF-THE-WORLD, flushing output") (flush-standard-output-streams) (sb!thread::terminate-session)