On Unix, the value of $? would be zero after running the following program: int main() {return 256;} 
Unix exit codes go from 0 to 255.  If you return or exit with a higher number, the exit code wraps around.
Some examples are: 256->0, 257->1, -1->255.  Note that on Windows the range of exit codes are larger.
Subscribe to:
Post Comments (Atom)
 
 
 
 

 
 Posts
Posts
 
 
No comments:
Post a Comment