console-close

Generic Function

Package: excl

Arguments: console-check

This generic function is called when the close box is clicked on the Console window in Allegro CL 5.0/5.0.1 on Windows. It is primarily intended to allow methods to affect the action when the close box is clicked, particularly when using the Integrated Development Environment.

On Unix, there is no Console window and the default method simply calls exit.

On Windows, the default action of console-close is to call (excl::mp-safe-exit 0).This causes Lisp to exit, unless errors occur during the stack unwinding process preceding the exit. If the exiting process gets hung up due to errors, then the user can try to close the Console again and this time the whole Lisp process will exit without trying to clean up the Lisp threads.

For example, the following code will cause the close of the Console to be ignored:

(defmethod excl:console-close :around (x)
 (setf (sys::memref-int x 0 0 :unsigned-long) 1))

An application can put an :around or :before method on console-close to change the default behavior. The argument passed in is the address of the flag which determines whether to call console-close the next time the Close button is clicked.

The default value is zero, meaning don't call console-close again. Set the flag to a non-zero value to cause console-close to be called again.

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.