::dmh::dp_atexit - arrange for command execution at the process exit
::dmh::dp_atexit option ?cmd?
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:
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.
Clears the dp_atexit list.
This command was originally part of the Tcl-dp package developed at
Berkeley by Brian Smith and Steve Yen.