0.6.8.13:
[sbcl.git] / src / code / cold-init.lisp
index 8e33ddb..3f24bb5 100644 (file)
@@ -11,9 +11,6 @@
 ;;;; files for more information.
 
 (in-package "SB!IMPL")
-
-(file-comment
-  "$Header$")
 \f
 ;;;; burning our ships behind us
 
@@ -88,7 +85,7 @@
   (/show0 "entering !COLD-INIT")
 
   ;; FIXME: It'd probably be cleaner to have most of the stuff here
-  ;; handled by calls a la !GC-COLD-INIT, !ERROR-COLD-INIT, and
+  ;; handled by calls like !GC-COLD-INIT, !ERROR-COLD-INIT, and
   ;; !UNIX-COLD-INIT. And *TYPE-SYSTEM-INITIALIZED* could be changed to
   ;; *TYPE-SYSTEM-INITIALIZED-WHEN-BOUND* so that it doesn't need to
   ;; be explicitly set in order to be meaningful.
   (show-and-call !random-cold-init)
 
   ;; All sorts of things need INFO and/or (SETF INFO).
+  (/show0 "about to SHOW-AND-CALL !GLOBALDB-COLD-INIT")
   (show-and-call !globaldb-cold-init)
 
   ;; This needs to be done early, but needs to be after INFO is
   ;; 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-init)))
 
-(defun quit (&key recklessly-p (unix-code 0))
+(defun quit (&key recklessly-p
+                 (unix-code 0 unix-code-p)
+                 (unix-status unix-code))
   #!+sb-doc
   "Terminate the current Lisp. Things are cleaned up (with UNWIND-PROTECT
   and so forth) unless RECKLESSLY-P is non-NIL. On UNIX-like systems,
-  UNIX-CODE is used as the status code."
+  UNIX-STATUS is used as the status code."
   (declare (type (signed-byte 32) unix-code))
+  ;; TO DO: UNIX-CODE was deprecated in sbcl-0.6.8, after having been
+  ;; around for less than a year. It should be safe to remove it after
+  ;; a year.
+  (when unix-code-p
+    (warn "The UNIX-CODE argument is deprecated. Use the UNIX-STATUS argument
+instead (which is another name for the same thing)."))
   (if recklessly-p
-      (sb!unix:unix-exit unix-code)
-      (throw '%end-of-the-world unix-code)))
+      (sb!unix:unix-exit unix-status)
+      (throw '%end-of-the-world unix-status)))
 \f
 ;;;; initialization functions