Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_posix/sys/src/ape/lib/ap/stdio/exit.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <unistd.h>
2
#define	NONEXIT	34
3
void (*_atexitfns[NONEXIT])(void);
4
void _doatexits(void){
5
	int i;
6
	void (*f)(void);
7
	for(i = NONEXIT-1; i >= 0; i--)
8
		if(_atexitfns[i]){
9
			f = _atexitfns[i];
10
			_atexitfns[i] = 0;	/* self defense against bozos */
11
			(*f)();
12
		}
13
}
14
void exit(int status)
15
{
16
	_doatexits();
17
	_exit(status);
18
}