What is the valid range for program return value in Linux/bash? [duplicate]

When a program exits, it can return to the parent process a small amount of information about the cause of termination, using the exit status. This is a value between 0 and 255 that the exiting process passes as an argument to exit.

http://www.gnu.org/s/hello/manual/libc/Exit-Status.html

alternatively:

http://en.wikipedia.org/wiki/Exit_status

came from “posix return codes” and “c return codes” respective Google searches.

Leave a Comment