From: William Harold Newman Date: Fri, 20 Oct 2000 15:57:51 +0000 (+0000) Subject: 0.6.7.18: FINISH-OUTPUT is now called more consistently on QUIT. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=49dfecae13e0faa1af793c32ed25d44d62da157a;p=sbcl.git 0.6.7.18: FINISH-OUTPUT is now called more consistently on QUIT. --- diff --git a/BUGS b/BUGS index f9d65a1..c20e522 100644 --- a/BUGS +++ b/BUGS @@ -742,10 +742,4 @@ Error in function C::GET-LAMBDA-TO-COMPILE: unrelated infinite-regress-errors problems, many related to revised signal handling, which were fixed around the same time. -* Even when FINISH-OUTPUT is called, the system doesn't in general - flush the last line of output unless it's terminated by a newline. - (This is particularly annoying because several Lisp functions like - PRINT *precede* their output with a newline, instead of following - it with a newline.) - * (SUBTYPEP '(AND ZILCH INTEGER) 'ZILCH) => NIL, NIL \ No newline at end of file diff --git a/NEWS b/NEWS index 262766d..ff049ff 100644 --- a/NEWS +++ b/NEWS @@ -497,12 +497,11 @@ changes in sbcl-0.6.8 relative to sbcl-0.6.7: to Martin Atzmueller's review of it. * The debugger now flushes standard output streams before it begins its output ("debugger invoked" and so forth). -?? The core version number and fasl file version number have both +* The core version number and fasl file version number have both been incremented, because of incompatible changes in the layout of static symbols. -?? FINISH-OUTPUT now works better than it did before. (It used to - have trouble with characters which weren't followed by a linefeed.) - ?? Remember to remove this from BUGS. +* FINISH-OUTPUT is now called more consistently on QUIT. (It + used to not be called for a saved Lisp image.) ?? The patch for the SUBSEQ bug reported on the cmucl-imp mailing list 12 September 2000 has been applied to SBCL. ?? Martin Atzmueller's versions of two CMU CL patches, as posted on diff --git a/src/code/cold-init.lisp b/src/code/cold-init.lisp index f01cb59..4bc3375 100644 --- a/src/code/cold-init.lisp +++ b/src/code/cold-init.lisp @@ -260,11 +260,8 @@ ;; The show is on. (terpri) (/show0 "going into toplevel loop") - (let ((wot (catch '%end-of-the-world - (/show0 "inside CATCH '%END-OF-THE-WORLD") - (toplevel)))) - (flush-standard-output-streams) - (sb!unix:unix-exit wot))) + (handling-end-of-the-world + (toplevel))) (defun quit (&key recklessly-p (unix-code 0 unix-code-p) diff --git a/src/code/save.lisp b/src/code/save.lisp index b61733d..ad79a4d 100644 --- a/src/code/save.lisp +++ b/src/code/save.lisp @@ -93,14 +93,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? diff --git a/src/code/toplevel.lisp b/src/code/toplevel.lisp index 583ef95..0b5dce9 100644 --- a/src/code/toplevel.lisp +++ b/src/code/toplevel.lisp @@ -59,6 +59,21 @@ (defvar *maximum-error-depth*) (defvar *current-error-depth*) +;;;; miscellaneous utilities for working with with TOPLEVEL + +;;; Execute BODY in a context where any %END-OF-THE-WORLD (thrown e.g. +;;; by QUIT) is caught and any final processing and return codes are +;;; handled appropriately. +(defmacro handling-end-of-the-world (&body body) + (let ((caught (gensym "CAUGHT"))) + `(let ((,caught (catch '%end-of-the-world + (/show0 "inside CATCH '%END-OF-THE-WORLD") + ,@body))) + (/show0 "back from CATCH '%END-OF-THE-WORLD, flushing output") + (flush-standard-output-streams) + (/show0 "calling UNIX-EXIT") + (sb!unix:unix-exit ,caught)))) + ;;;; working with *CURRENT-ERROR-DEPTH* and *MAXIMUM-ERROR-DEPTH* ;;; INFINITE-ERROR-PROTECT is used by ERROR and friends to keep us out of diff --git a/version.lisp-expr b/version.lisp-expr index ad58f3e..9d15931 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -15,4 +15,4 @@ ;;; versions, and a string a la "0.6.5.12" is used for versions which ;;; aren't released but correspond only to CVS tags or snapshots. -"0.6.7.17" +"0.6.7.18"