-
Notifications
You must be signed in to change notification settings - Fork 440
Closed
Labels
Milestone
Description
Default exit codes in 4.0-alpha-3 are based on the FreeBSD exit codes. These are frequently cited but do not seem to be used in popular unix utilities.
It may make sense to simplify the default picocli exit codes to 1
for software exceptions in the client code, and 2
for invalid usage. This follows the recommendation of this StackOverflow answer.
We can add the following links to the javadoc of the ExitCode
class:
- FreeBSD exit codes: https://www.freebsd.org/cgi/man.cgi?query=sysexits&sektion=3
- Windows exit codes: http://www.hiteksoftware.com/knowledge/articles/049.htm
- Bash exit codes: http://www.faqs.org/docs/abs/HTML/exitcodes.html#EXITCODESREF
- Wikipedia page: https://en.wikipedia.org/wiki/Exit_status
Note that *nix shells may restrict exit codes to the 0-255 range, DOS seems to allow larger numbers. See https://stackoverflow.com/questions/179565/exitcodes-bigger-than-255-possible