exit.c (244B)
1 #include <stdlib.h> 2 3 #include "../libc.h" 4 #include "../syscall.h" 5 6 #undef exit 7 8 void (*_flushall)(void); 9 void (*_atexithdl)(void); 10 11 void 12 exit(int status) 13 { 14 if (_atexithdl) 15 (*_atexithdl)(); 16 if (_flushall) 17 (*_flushall)(); 18 _exit(status); 19 }