shithub: scc

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