Implementing a library EXIT function

You can develop a function in a library to be executed from an EXIT function.