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
registered.

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 should not rely on the identity
of objects with thread storage duration.