LibC: exit() calls _fini()

This commit is contained in:
Bananymous 2023-04-19 00:42:00 +03:00
parent d74ce4950c
commit 702016a6e3
1 changed files with 3 additions and 0 deletions

View File

@ -4,6 +4,8 @@
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
extern "C" void _fini();
void abort(void) void abort(void)
{ {
ASSERT_NOT_REACHED(); ASSERT_NOT_REACHED();
@ -11,6 +13,7 @@ void abort(void)
void exit(int status) void exit(int status)
{ {
_fini();
_exit(status); _exit(status);
ASSERT_NOT_REACHED(); ASSERT_NOT_REACHED();
} }