Hi
I am looking for a “termination” routine that executes finalization/cleanup code, registered via atexit() and global/static object deconstructors, except it doesn’t end the process. Instead returns to the caller (which in turn should fully exit the process) or performs an assignable callback (and then terminates).
So far I have only encountered two such functions: _cexit() for windows and _exithandle() for solaris (which I am not quite sure performs as expected). But I also seek such implementations for Linux, any ideas? “Macros Controlling Initialization Routines” in GCC might help if I could make sense of them.
Any help is appreciated.