While the return value mainis int(usually 32 bits), only 8 bits of the exit code are transmitted to the rest of the operating system.
As Mystic have , 2000 % 256 = 208.
Linux wait waitpid ( exit s). , int, , , , / .. WEXITSTATUS.
int status;
waitpid(childpid, &status, 0);
if (WIFEXITED(status))
printf("Child exited with code %d\n", WEXITSTATUS(status));
, man!
, :
kernel/exit.c , exit:
888 SYSCALL_DEFINE1(exit, int, error_code)
889 {
890 do_exit((error_code&0xff)<<8);
891 }
, int 15: 8 , do_exit.
: