~derick-eddington/ikarus/ikarus.dev-derick

Viewing all changes in revision 1873.

  • Committer: Derick Eddington
  • Date: 2012-05-23 22:47:25 UTC
  • Revision ID: derick.eddington@gmail.com-20120523224725-dk404fq9enxnszm0
Add support for running user-supplied exit handlers when exit is called.  An exit handler may be any zero-argument procedure.  Exit handlers are called in the reverse order of their registration.  Exit is called, and so the exit handlers are called, for both normal and exceptional types of program termination: end of program expressions, explicit call to exit, and unhandled exceptions including those caused by Posix signals.  This is especially useful to ensure resources are cleaned-up for all these types of program termination.  Abnormal program termination caused by something like SIGKILL or segmentation-fault does not try to run exit handlers.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: