31.1. Customizing CLISP Process Initialization and Termination

31.1.1. Cradle to Grave
31.1.2. Customizing Initialization
31.1.2.1. The difference between CUSTOM:*INIT-HOOKS* and init function
31.1.3. Customizing Termination

31.1.1. Cradle to Grave

What is done when

    1. Parse command line arguments until the first positional argument (see :SCRIPT in Section 31.2, “Saving an Image”).

    2. Load the memory image.

    3. Install internal signal handlers.

    4. Initialize time variables.

    5. Initialize locale-dependent encodings.

    6. Initialize stream variables.

    7. Initialize pathname variables.

    8. Initialize FFI.

    9. Initialize modules.

    10. Run all functions in CUSTOM:*INIT-HOOKS*.

    11. Say hi, unless suppressed by -q.

    12. Load RC file, unless suppressed by -norc.

  1. Handle command line options: file loading and/or compilation, form evaluation, script execution, read-eval-print loop.

    1. Unwind the STACK, executing cleanup forms in UNWIND-PROTECT.

    2. Run all functions in CUSTOM:*FINI-HOOKS*.

    3. Call FRESH-LINE on the standard streams.

    4. Say bye unless suppressed by -q.

    5. Wait for a keypress if requested by -w.

    6. Close all open FILE-STREAMs.

    7. Finalize modules.

    8. Close all open DLLs.

31.1.2. Customizing Initialization

CUSTOM:*INIT-HOOKS* is run like this:

(IGNORE-ERRORS (MAPC #'FUNCALL CUSTOM:*INIT-HOOKS*))

31.1.2.1. The difference between CUSTOM:*INIT-HOOKS* and init function

31.1.3. Customizing Termination

CUSTOM:*FINI-HOOKS* is run like this:

(MAPC #'FUNCALL CUSTOM:*FINI-HOOKS*)

These notes document CLISP version 2.49Last modified: 2010-07-07