console-close

$Revision: 5.0.2.2 $

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 on Windows. It is primarily intended to allow methods to affect the action when the close box is clickled, particularly when using the Integrated Development Environment.

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

On Windows, the default action of excl: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 excl:console-close to change the default behavior. The argument passed in is the address of the flag which determines whether to call excl: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 excl:console-close to be called again.

The general documentation description is in introduction.htm. The index is in index.htm.

Copyright (C) 1998-1999, Franz Inc., Berkeley, CA. All Rights Reserved.