C atexit() considerations

In all C applications, the atexit list is honored only after all condition handling activity has taken place and all user code is removed from the stack, which invalidates any jump buffer previously established.

With C, you can register a number of routines that gain control during the termination of an enclave. When using the C atexit() function, consider the following:

C++ supports atexit(), but any function pointer input to atexit() must be declared as having extern "C" linkage.