2006/11/16

exit, return, die

exit: terminate the program, it will return 0
exit(1): terminate the program, return 256;
exit(2): terminate the program, return 512;

die: terminate the program, return 65280;

return: return from a function, and it cannot be used outside function.

Note: If the program use multithreading and one thread died, then the whole program will not end until all other threads end.

No comments:

Post a Comment