Variable | Package: system | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version

## *exit-cleanup-forms*

Forms can be pushed onto this variable to ensure that they are eval'd before exit actually exits the lisp. During the processing time this variable is set to `nil`, so that if any of the forms cause an error the exit operation can finish anyway. The usual way to exit Lisp is to call exit although there are many actions which cause that function to be called (e.g. calling the top-level comand :exit or, on Windows, clicking on the Console or Project Window close buttons.) In the example, we show what a list of forms might look like and have one of the forms cause a break (aborting the exit). Note that the value of the variable is `nil` after the failed exit.

    USER(38): sys:*exit-cleanup-forms*
    NIL
    USER(39): (setq sys:*exit-cleanup-forms*
                 (list '(format t "Exiting!!!~%")
                       '(break)))
    ((FORMAT T "Exiting!!!~%") (BREAK))
    USER(40): :exit
    Exiting!!!
    Break: call to the `break' function.

    Restart actions (select using :continue):
    0: return from break.
    1: Really exit (:no-unwind t)
    [1c] USER(41): :res
    USER(42): sys:*exit-cleanup-forms*
    NIL
    USER(43):

Copyright (c) 1998-2022, Franz Inc. Lafayette, CA., USA. All rights reserved.
This page was not revised from the 10.0 page.
Created 2019.8.20.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 10.1 Unrevised from 10.0 to 10.1. 10.0 version