summaryrefslogtreecommitdiff
path: root/libc/stdlib/abort.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdlib/abort.c')
-rw-r--r--libc/stdlib/abort.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libc/stdlib/abort.c b/libc/stdlib/abort.c
index 23510e913..7b7d6bb50 100644
--- a/libc/stdlib/abort.c
+++ b/libc/stdlib/abort.c
@@ -25,8 +25,8 @@ Cambridge, MA 02139, USA. */
#include <signal.h>
#include <errno.h>
-typedef void (*vfuncp) ();
-extern vfuncp __cleanup;
+typedef void (*vfuncp) (void);
+extern vfuncp __uClibc_cleanup;
extern void _exit __P((int __status)) __attribute__ ((__noreturn__));
/* Cause an abnormal program termination with core-dump. */
@@ -38,8 +38,9 @@ void abort(void)
sigprocmask(SIG_UNBLOCK, &sigset, (sigset_t *) NULL);
}
- if (__cleanup)
- __cleanup();
+ if (__uClibc_cleanup) { /* Not already executing __uClibc_cleanup. */
+ __uClibc_cleanup();
+ }
while (1)
if (raise(SIGABRT))