shithub: scc

ref: 30c13a046ae2be0b83933a64f197250430f21c68
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);
}