ns_atshutdown

Register a script to be run at server shutdown

Syntax

ns_atshutdown {script | procname ?args?}

Description

ns_atshutdown registers a Tcl script or procedure to be run when the virtual server shuts down.

Example


proc theLastThing {} {
    global Shared
    close $Shared(file)
    ns_mutex destroy $Shared(lock)
}

...
ns_atshutdown theLastThing
...