Skip to main content
3 of 4
rephrase "an usual"
DopeGhoti
  • 79.2k
  • 10
  • 107
  • 141

Because 0 is the exit code for a normal exit state.

Intercepting an Interrupt or Break signal is not a usual exit state, nor is being suspended to the background. The non-zero exit codes tell you this is what is happening so that you can react accordingly in a script if the job it fires off is killed or suspended rather than exiting conventionally with a non-error state.

More details can be found at http://tldp.org/LDP/abs/html/exitcodes.html#EXITCODESREF.

DopeGhoti
  • 79.2k
  • 10
  • 107
  • 141