Question

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?

No correct solution

Licensed under: CC-BY-SA with attribution
scroll top