I was wanting to execute some code during quit session,
The two triggers for this are chimera.APPQUIT and chimera.CONFIRM_APPQUIT. For the former, Chimera is going to quit afterward no matter what. For the latter, the trigger data is a list. You can append a text string to the list. If you do, then that string will be displayed to the user in a confirmation dialog with the text "Really Quit?" appended afterward. The user then chooses whether to really quit or not. If they do quit then an APPQUIT will be coming along shortly...
close session
chimera.CLOSE_SESSION and chimera.CONFIRM_CLOSE_SESSION. Exactly analogous to the APPQUIT triggers.