Review Exit Status Codes
We should define a set of exit status that the shell may return. If we follow Bash, we might have something like this:
- 0 means
SUCCESS
- 1 means
FAILURE
- 2 means
BAD_ARG
- 3...125 can be defined by programs executed by the shell
- 126 means
COULD_NOT_EXEC
- 127 means
COMMAND_NOT_FOUND
- 128
INVALID_EXIT_ARG
- 128+N where N is equal to the signal that stopped the shell
- 255+ is
EXIT_OUT_OF_RANGE
But we may want to think about defining our own error codes.