arfer Master

Joined: 26 Nov 2004 Posts: 436 Location: Manchester, UK
|
Posted: Fri Dec 26, 2008 5:32 pm Post subject: |
|
|
The answer depends entirely on how/why the bot is forced to shutdown. For example, a kill -9 <pid> from the bot's shell is immediate and would not allow time to execute code.
Generally, the EVNT bind is used to trigger Tcl code with a number of available types associated with shutdown (see tcl-commands.html in your bot installation).
sighup = kill -HUP <pid> OR kill -1 <pid> (hangup process)
sigill = kill -ILL <pid> OR kill -4 <pid> (illegal instruction)
sigquit = kill -QUIT <pid> OR kill -3 <pid> (quit process)
sigterm = kill -TERM <pid> OR kill -15 <pid> (terminate nicely)
I think I have the correct numeric kill signals. It is not clear in tcl-commands.html
I have never used these EVNT bind types, so I am not aware to what extent they would allow execution of Tcl before shutdown, neither am I aware of the shutdown type resulting from say the command .die in the partyline. Terminate nicely I would hope.
I can only suggest you experiment with them. Sorry I can't be of any further assistance. |
|