Author: jmorlan Date: Thu Jul 31 12:46:50 2008 New Revision: 34980
URL: http://svn.reactos.org/svn/reactos?rev=34980&view=rev Log: In exit and _cexit, call atexit routines. (Bug 3432_)
Modified: trunk/reactos/lib/sdk/crt/stdlib/_exit.c
Modified: trunk/reactos/lib/sdk/crt/stdlib/_exit.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/crt/stdlib/_exit.c?... ============================================================================== --- trunk/reactos/lib/sdk/crt/stdlib/_exit.c [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/crt/stdlib/_exit.c [iso-8859-1] Thu Jul 31 12:46:50 2008 @@ -1,5 +1,7 @@ #include <precomp.h> #include <internal/atexit.h> + +extern void _atexit_cleanup(void);
struct __atexit *__atexit_ptr = 0;
@@ -18,6 +20,7 @@ */ /* in case the program set it this way */ _setmode(0, O_TEXT); + _atexit_cleanup(); _exit(status); for(;;); } @@ -28,6 +31,7 @@ */ void _exit(int _status) { + // FIXME: _exit and _c_exit should prevent atexit routines from being called during DLL unload ExitProcess(_status); for(;;); } @@ -37,6 +41,7 @@ */ void _cexit( void ) { + _atexit_cleanup(); // flush }
@@ -45,5 +50,6 @@ */ void _c_exit( void ) { + // FIXME: _exit and _c_exit should prevent atexit routines from being called during DLL unload // reset interup vectors }