The exit status of a program is the small integer, from 0 to 255, it hands back when it ends: the value returned by main or passed to exit. By convention 0 means success and any other value failure. The shell keeps the status of the last command in the variable $?.
Computer Science · Glossário