[ros-diffs] [jmorlan] 34980: In exit and _cexit, call atexit routines. (Bug 3432_)
jmorlan at svn.reactos.org
jmorlan at svn.reactos.org
Thu Jul 31 19:46:50 CEST 2008
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?rev=34980&r1=34979&r2=34980&view=diff
==============================================================================
--- 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
}
More information about the Ros-diffs
mailing list