(prepend-runtime int)
(save-runtime-options int)
(compressed int)
- (compression-level int))
+ (compression-level int)
+ (application-type int))
#!+gencgc
(define-alien-routine "gc_and_save" void
(prepend-runtime int)
(save-runtime-options int)
(compressed int)
- (compression-level int))
+ (compression-level int)
+ (application-type int))
#!+gencgc
(defvar sb!vm::*restart-lisp-function*)
(purify t)
(root-structures ())
(environment-name "auxiliary")
- (compression nil))
+ (compression nil)
+ #!+win32
+ (application-type :console))
#!+sb-doc
"Save a \"core image\", i.e. enough information to restart a Lisp
process later in the same state, in the file of the specified name.
The function to run when the created core file is resumed. The
default function handles command line toplevel option processing
and runs the top level read-eval-print loop. This function returning
- is equivalent to (SB-EXT:QUIT :UNIX-STATUS 0) being called.
+ is equivalent to (SB-EXT:EXIT :CODE 0) being called.
TOPLEVEL functions should always provide an ABORT restart: otherwise
code they call will run without one.
an integer from -1 to 9, corresponding to zlib compression levels, or T
(which is equivalent to the default compression level, -1).
+ :APPLICATION-TYPE
+ Present only on Windows and is meaningful only with :EXECUTABLE T.
+ Specifies the subsystem of the executable, :CONSOLE or :GUI.
+ The notable difference is that :GUI doesn't automatically create a console
+ window. The default is :CONSOLE.
+
The save/load process changes the values of some global variables:
*STANDARD-OUTPUT*, *DEBUG-IO*, etc.
(foreign-bool executable)
(foreign-bool save-runtime-options)
(foreign-bool compression)
- (or compression 0)))
+ (or compression 0)
+ #!+win32
+ (ecase application-type
+ (:console 0)
+ (:gui 1))
+ #!-win32 0))
(without-gcing
(save name
(get-lisp-obj-address #'restart-lisp)
(foreign-bool executable)
(foreign-bool save-runtime-options)
(foreign-bool compression)
- (or compression 0))))))
+ (or compression 0)
+ #!+win32
+ (ecase application-type
+ (:console 0)
+ (:gui 1))
+ #!-win32 0)))))
;; Save the restart function into a static symbol, to allow GC-AND-SAVE
;; access to it even after the GC has moved it.
#!+gencgc
(defun deinit ()
(call-hooks "save" *save-hooks*)
+ #!+sb-wtimer
+ (itimer-emulation-deinit)
(when (rest (sb!thread:list-all-threads))
(error "Cannot save core with multiple threads running."))
(float-deinit)
(profile-deinit)
- (debug-deinit)
(foreign-deinit)
(stream-deinit)
(deinit-finalizers)