sysexits
BSD sysexits.h
Conventional exit codes defined by BSD's sysexits.h (EX_OK through EX_CONFIG), intended to categorise why a program exited non-zero. Used by sendmail, postfix, and many other Unix utilities; still shipped in the C library headers on FreeBSD, macOS, and most Linux distributions.
16 codes
· All codes 16 codes
- EX_CANTCREAT Cannot create output file A user-specified output file could not be created, e.g. due to a bad path or lack of permissions.
- EX_CONFIG Configuration error Something was found in an unconfigured or misconfigured state, such as a missing or invalid configuration file.
- EX_DATAERR Data format error The input data was incorrect in some way, such as failing a syntax or validation check.
- EX_IOERR Input/output error An error occurred while doing I/O on some file.
- EX_NOHOST Host name unknown The host specified did not exist, e.g. a hostname could not be resolved via DNS.
- EX_NOINPUT Cannot open input An input file, other than the system input file, did not exist or was not readable.
- EX_NOPERM Permission denied The program did not have sufficient permission to perform the requested operation, distinct from a plain file system permission error.
- EX_NOUSER Addressee unknown The user specified did not exist, e.g. an email address that could not be resolved to a recipient.
- EX_OK Successful termination The program completed successfully; no error occurred.
- EX_OSERR System error An operating system error was detected, such as the inability to fork a new process or create a pipe.
- EX_OSFILE Critical OS file missing Some system file, such as /etc/passwd, does not exist, cannot be opened, or has a syntax error.
- EX_PROTOCOL Remote protocol error The remote system returned something invalid during a protocol exchange.
- EX_SOFTWARE Internal software error An internal software error was detected; this should be limited to non-operating-system-related errors.
- EX_TEMPFAIL Temporary failure A temporary failure occurred; the program is invited to retry the request, e.g. after a transient network outage.
- EX_UNAVAILABLE Service unavailable A required service is unavailable, e.g. a support program or file did not exist, or a device was not accessible.
- EX_USAGE Command line usage error The command was used incorrectly, e.g. with the wrong number of arguments, a bad flag, or a bad syntax in a parameter.