From ecce86c0398565eb229111c76e89b60c94b9e7f4 Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Wed, 3 Dec 2014 06:31:06 +0330 Subject: [PATCH] stdlib: call __neatlibc_exit() in exit() --- stdlib.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/stdlib.c b/stdlib.c index c45e4c3..4c198a6 100644 --- a/stdlib.c +++ b/stdlib.c @@ -7,11 +7,6 @@ char **environ; -void exit(int status) -{ - _exit(status); -} - int abs(int n) { return n >= 0 ? n : -n; @@ -66,3 +61,9 @@ void __neatlibc_exit(void) for (i = 0; i < atexit_cnt; i++) atexit_func[i](); } + +void exit(int status) +{ + __neatlibc_exit(); + _exit(status); +} -- 2.11.4.GIT