VariablePackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

*restart-app-function*

The value of this variable should be a function name or function object (suitable as the first argument to funcall) or nil. The function should take no arguments. It is called at the end of the startup procedure instead of a standard Lisp listener being started. This function is designed to provide its own top-level (in place of a Lisp listener). If a top-level is not needed for the application, this function should perform whatever is required by the application and then exit. The function should not return. The behavior if it does return is undefined.

When this variable is nil, a standard Lisp listener is started using start-interactive-top-level.

Warning: the functions build-lisp-image and generate-application both accept a :restart-app-function keyword argument whose value defaults to the value of this variable. However, the only valid values for that argument are a symbol or a list (typically a lambda expression defining an anonymous function). If the value of this variable is a function object, and the :restart-app-function argument is not specified, the call to build-lisp-image or generate-application will fail. Thus, this will fail:

(setq *restart-app-function* #'(lambda () (do-my-startup))
(build-lisp-image "myimage.dxl")

and this will succeed:

(setq *restart-app-function* '(lambda () (do-my-startup))
(build-lisp-image "myimage.dxl")

If the Lisp uses a minimal top level (i.e. the image was built with the include-tpl keyword argument to build-lisp-image specified nil) and this variable is nil, start-interactive-top-level is still called but has a different definition than in a standard image with a standard top level. See Minimal top levels in building-images.htm.

The variable is designed for applications. Users and programmers wanting to dump Lisp images for later use will not typically set this variable (instead, *restart-init-function*, allows for initializations prior to the Lisp listener starting). Programmers who want to start a Lisp listener themselves (perhaps providing a choice between the application top-level and a standard listener) from within *restart-app-function* should see the description of start-interactive-top-level.

See also startup.htm for general information on starting Allegro CL, including information on command-line arguments and init files. See particularly the section What Lisp does when it starts up in that document.


Copyright (c) 1998-2016, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version