shithub: scc

ref: 8e60c90fec994d43fd1b4be0c4c15c0381f1e7eb
dir: /libc/src/exit.c/

View raw version
/* See LICENSE file for copyright and license details. */

#include <stdlib.h>
#undef exit

void (*_atexitf[_ATEXIT_MAX])(void);

void
exit(int status)
{
	void (**bp)(void);

	for (bp = _atexitf; bp < &_atexitf[_ATEXIT_MAX] && *bp; ++bp)
		(*bp)();
	_Exit();
}