Non-zero exit status for clean exit
- by trinithis
Is it acceptable to return a non-zero exit code if the program in question ran properly? For example, say I have a simple program that (only) does the following:
Program takes N arguments. It returns an exit code of min(N, 255). Note that any N is valid for the program.
A more realistic program might return different codes for successfully ran programs that signify different things. Should these programs instead write this information to a stream instead, such as to stdout?