TIP: 121 Title: Controlled Application Shutdown via Tcl_Exit
Version: $Revision: 1.8 $ Author: Joe Mistachkin State: Final
Type: Project Vote: Done Created: 05-Dec-2002 Post-History: Tcl-
Version: 8.5 ~ Abstract This TIP will allow all applications to
perform a controlled shutdown (or do nothing) in the event that
''Tcl_Exit()'' is called. ~ Rationale For most applications
written in C that use Tcl, calling the runtime ''exit()''
function is normally a reasonable way to shutdown the
application. Unfortunately, this is not always the case.
Applications written in other languages (and very complex C
applications) may have very specific application shutdown
requirements. This is especially true in multi-threaded
environments. The problem is further compounded by extensions
that use ''Tcl_Exit''. ~ Versus Exit Handlers There are distinct
advantages to using this method instead of using normal exit
handlers in some cases. The normal exit handler cannot defer (or
in an emergency, prevent) the application shutdown be