312
Zero => Everything Okay
Positive => Something I expected could potentially go wrong went wrong (bad command-line, can't find file, could not connect to server)
Negative => Something I didn't expect at all went wrong (system error - unanticipated exception - externally forced termination e.g. kill -9)
(values greater than 128 are actually negative, if you regard them as 8-bit signed binary, or twos complement)
There's a load of good standard exit-codes here