ack/lang/cem/libcc.ansi/sys/exit/exit.c
2018-09-09 18:51:00 +02:00

23 lines
459 B
C

/*
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
* See the copyright notice in the ACK home directory, in the file "Copyright".
*/
/* $Id$ */
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include "atexits.h"
void (*__functab[NEXITS])(void);
int __funccnt = 0;
void exit(int status)
{
/* "Called in reversed order of their registration" */
while (__funccnt)
(*__functab[--__funccnt])();
_exit(status);
}