scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

exit.c (173B)


      1 #include <stdlib.h>
      2 #undef exit
      3 
      4 void (*_exitf[_ATEXIT_MAX])(void);
      5 unsigned _exitn;
      6 
      7 void
      8 exit(int status)
      9 {
     10 	while (_exitn > 0)
     11 		(*_exitf[--_exitn])();
     12 	_Exit(status);
     13 }