shithub: scc

ref: cae3fc327c4969ad626fbbe90f00026e977671e0
dir: /src/libc/stdlib/exit.c/

View raw version
#include <stdlib.h>

#include "../libc.h"
#include "../syscall.h"

#undef exit

void (*_flushall)(void);
void (*_atexithdl)(void);

void
exit(int status)
{
	if (_atexithdl)
		(*_atexithdl)();
	if (_flushall)
		(*_flushall)();
	_exit(status);
}