Next, all open C streams (as mediated by the function
signatures declared in <cstdio>)
with unwritten buffered data are flushed, all open C
streams are closed, and all files created by calling
tmpfile() are removed.
Effects: Functions registered by calls to at_quick_exit are called in the
reverse order of their registration, except that a function shall be called after any
previously registered functions that had already been called at the time it was
Objects shall not be destroyed as a result of calling quick_exit.
If a registered function invoked by quick_exit exits via an exception,
the function std::terminate is invoked ([except.terminate]).
A function registered via at_quick_exit
is invoked by the thread that calls quick_exit,
which can be a different thread
than the one that registered it, so registered functions cannot rely on the identity
of objects with thread storage duration.
— end note]
After calling registered functions, quick_exit shall call _Exit(status).