]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/bootstrap/finish-bootstrap.factor
run bootstrap and startup hooks inside a with-destructors. use &dispose instead...
[factor.git] / basis / bootstrap / finish-bootstrap.factor
index 65115fc2df21a05e4d39738714a976c8042dca73..35b40df97a322e967807bbd8d9e4d5547a68f14f 100644 (file)
@@ -1,17 +1,19 @@
 USING: init command-line debugger system continuations
-namespaces eval kernel vocabs.loader io ;
+namespaces eval kernel vocabs.loader io destructors ;
 
 [
     boot
-    do-startup-hooks
     [
-        (command-line) parse-command-line
-        load-vocab-roots
-        run-user-init
-        "e" get [ eval( -- ) ] when*
-        ignore-cli-args? not script get and
-        [ run-script ] [ "run" get run ] if*
-        output-stream get [ stream-flush ] when*
-        0 exit
-    ] [ print-error 1 exit ] recover
+        do-startup-hooks
+        [
+            (command-line) parse-command-line
+            load-vocab-roots
+            run-user-init
+            "e" get [ eval( -- ) ] when*
+            ignore-cli-args? not script get and
+            [ run-script ] [ "run" get run ] if*
+            output-stream get [ stream-flush ] when*
+            0
+        ] [ print-error 1 ] recover
+     ] with-destructors exit
 ] set-boot-quot