shithub: scc

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