Location:
stdlib_r.h
IMPORT_C void _atexit_processing_r(struct _reent *);
It's possible to override exit()
by supplying abort()
, exit()
and _exit()
The generic exit()
and abort()
routines look like
void exit(int code)
_ATTRIBUTE((noreturn)) { _atexit_processing_r(_REENT); _exit(code); } void abort(void)
_ATTRIBUTE((noreturn)) { _exit(1); }
which then allows your _exit()
to capture all exits from ESTLIB, except for __assert()
which calls abort()
.
|