libc: Flush all open streams on exit
This does nothing for now, but prepares for buffering.
This commit is contained in:
parent
5458286309
commit
cfb0ead2d9
@ -1,3 +1,4 @@
|
|||||||
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
typedef void (*atexit_func_t)(void);
|
typedef void (*atexit_func_t)(void);
|
||||||
@ -23,6 +24,8 @@ extern "C"
|
|||||||
{
|
{
|
||||||
while (atexit_registered_funcs--) { atexit_funcs[atexit_registered_funcs](); }
|
while (atexit_registered_funcs--) { atexit_funcs[atexit_registered_funcs](); }
|
||||||
|
|
||||||
|
fflush(NULL);
|
||||||
|
|
||||||
_Exit(status);
|
_Exit(status);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user