NAME

::dmh::dp_atexit - arrange for command execution at the process exit

SYNOPSIS

::dmh::dp_atexit option ?cmd?

DESCRIPTION

The dp_atexit command manages the dp_atexit list, a list of callback routines that are evaluated just before the Tcl/Tk application exits.  It works by replacing the usual Tcl exit command with a custom version.  This is useful for applications where clean up actions should be performed before the process exits. The argument option specifies the operation to be performed on the dp_atexit list. The valid options are:

dp_atexit list
Returns the current dp_atexit list.
dp_atexit set newList
Sets the dp_atexit list newList.
dp_atexit append callback
Append callback to the end of the dp_atexit list.
dp_atexit appendUnique callback
Appends callback to the end of the dp_atexit list if it's not already a member of the list.
dp_atexit prepend callback
Inserts callback at the front of the dp_atexit list.
dp_atexit insert beforeCallback callback
Inserts callback before beforeCallback in the dp_atexit list. If beforeCallback is not in the dp_atexit list, no action is taken.
dp_atexit delete callback
Delete callback from the dp_atexit list. If callback is not in the dp_atexit list, no action is taken.
dp_atexit clear
Clears the dp_atexit list.

SEE ALSO

exit

AUTHOR

This command was originally part of the Tcl-dp package developed at Berkeley by Brian Smith and Steve Yen.

KEYWORDS

atexit exit