> atexit and at_quick_exit needs to manage similar table of functions.
> Because of that there's a set of helper functions that can be used to
> accomplish it (*_onexit_table functions). It's even documented that it's
> used internally: https://msdn.microsoft.com/en-us/library/mt670601.aspx
Yes, this makes sense.
Should I also send in a patch for MSVCRT__onexit to use _register_onexit_function, and for __MSVCRT__call_atexit to use _execute_onexit_table?
Because those too duplicate the functionality, that's where I got that from.
I'd also add some tests while I'm on it.
Regards,
Fabian Maurer