mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
In exit and _cexit, call atexit routines. (Bug 3432_)
svn path=/trunk/; revision=34980
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#include <precomp.h>
|
||||
#include <internal/atexit.h>
|
||||
|
||||
extern void _atexit_cleanup(void);
|
||||
|
||||
struct __atexit *__atexit_ptr = 0;
|
||||
|
||||
/*
|
||||
@@ -18,6 +20,7 @@ void exit(int status)
|
||||
*/
|
||||
/* 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)
|
||||
*/
|
||||
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 _exit(int _status)
|
||||
*/
|
||||
void _cexit( void )
|
||||
{
|
||||
_atexit_cleanup();
|
||||
// flush
|
||||
}
|
||||
|
||||
@@ -45,5 +50,6 @@ void _cexit( void )
|
||||
*/
|
||||
void _c_exit( void )
|
||||
{
|
||||
// FIXME: _exit and _c_exit should prevent atexit routines from being called during DLL unload
|
||||
// reset interup vectors
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user