009-exit-code.c (435B)
1 /* exit(N) -> stdlib/exit.c -> stdlib/__exit.c -> boot2-syscall.c::_exit 2 * -> P1pp sys_exit. 00-exit covers the implicit return-from-main path; 3 * this fixture exercises the explicit terminator that abort() / errors 4 * out of main use. The literal `return 99;` after the exit call must 5 * never run — if it does, the harness sees exit code 99 and FAILs. */ 6 extern void exit (int code); 7 8 int 9 main (void) 10 { 11 exit (7); 12 return 99; 13 }