mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 09:43:04 +00:00
In exit and _cexit, call atexit routines. (Bug 3432_)
svn path=/trunk/; revision=34980
This commit is contained in:
parent
41ad8e0c80
commit
173a8d6c7a
1 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,8 @@
|
||||||
#include <precomp.h>
|
#include <precomp.h>
|
||||||
#include <internal/atexit.h>
|
#include <internal/atexit.h>
|
||||||
|
|
||||||
|
extern void _atexit_cleanup(void);
|
||||||
|
|
||||||
struct __atexit *__atexit_ptr = 0;
|
struct __atexit *__atexit_ptr = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -18,6 +20,7 @@ void exit(int status)
|
||||||
*/
|
*/
|
||||||
/* in case the program set it this way */
|
/* in case the program set it this way */
|
||||||
_setmode(0, O_TEXT);
|
_setmode(0, O_TEXT);
|
||||||
|
_atexit_cleanup();
|
||||||
_exit(status);
|
_exit(status);
|
||||||
for(;;);
|
for(;;);
|
||||||
}
|
}
|
||||||
|
@ -28,6 +31,7 @@ void exit(int status)
|
||||||
*/
|
*/
|
||||||
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);
|
ExitProcess(_status);
|
||||||
for(;;);
|
for(;;);
|
||||||
}
|
}
|
||||||
|
@ -37,6 +41,7 @@ void _exit(int _status)
|
||||||
*/
|
*/
|
||||||
void _cexit( void )
|
void _cexit( void )
|
||||||
{
|
{
|
||||||
|
_atexit_cleanup();
|
||||||
// flush
|
// flush
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,5 +50,6 @@ void _cexit( void )
|
||||||
*/
|
*/
|
||||||
void _c_exit( void )
|
void _c_exit( void )
|
||||||
{
|
{
|
||||||
|
// FIXME: _exit and _c_exit should prevent atexit routines from being called during DLL unload
|
||||||
// reset interup vectors
|
// reset interup vectors
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue