exit

Function

Package: excl

Arguments: &optional code&key no-unwind quiet

This exits to the shell or OS, without querying the user, returning code to the program which invoked Common Lisp. code must be an integer whose range is determined by the Operating System, and hence the value may be truncated for large integers.

The keyword argument no-unwind defaults to nil. When it is nilexit causes each process to throw out of its current computation thereby executing all outstanding unwind-protect cleanup forms (see process-kill). If an error occurs during the execution of an unwind-protect cleanup form or the process becomes inactive, then exit could hang forever waiting for the process to die. exit prints the name of processes on which it is waiting. Processes which cause exit to hang indefinitely (because the error causes the process to enter a break level) can be killed manually from another window or editor buffer, or exit can be interrupted with C-c. Note, if exit is executed again after being interrupted, the unwind-protect which caused it to hang will likely not do so again, because execution will already have exited the offending unwind-protect; for this reason, exit could possibly be re-evaluated.

The keyword argument quiet defaults to nil. If it is specified true, information about what Lisp is doing as it exits, normally printed, is suppressed.

If no-unwind is true, then exit does not evaluate unwind-protect cleanup forms. Therefore, evaluating the form

(exit 0 :no-unwind t)

should always cause Lisp to exit.

See also *exit-cleanup-forms* which is a list of forms to evaluated before exiting.

See How to exit Lisp in startup.htm.

The documentation is described in introduction.htm and the index is in index.htm.

Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.

Created 2000.10.5.