| 1 | /* |
| 2 | ** SYSEXITS.H -- Exit status codes for system programs. |
| 3 | ** |
| 4 | ** This include file attempts to categorize possible error |
| 5 | ** exit statuses for system programs, notably delivermail |
| 6 | ** and the Berkeley network. |
| 7 | ** |
| 8 | ** Error numbers begin at EX__BASE to reduce the possibility of |
| 9 | ** clashing with other exit statuses that random programs may |
| 10 | ** already return. The meaning of the codes is approximately |
| 11 | ** as follows: |
| 12 | ** |
| 13 | ** EX_USAGE -- The command was used incorrectly, e.g., with |
| 14 | ** the wrong number of arguments, a bad flag, a bad |
| 15 | ** syntax in a parameter, or whatever. |
| 16 | ** EX_DATAERR -- The input data was incorrect in some way. |
| 17 | ** This should only be used for user's data & not |
| 18 | ** system files. |
| 19 | ** EX_NOINPUT -- An input file (not a system file) did not |
| 20 | ** exist or was not readable. This could also include |
| 21 | ** errors like "No message" to a mailer (if it cared |
| 22 | ** to catch it). |
| 23 | ** EX_NOUSER -- The user specified did not exist. This might |
| 24 | ** be used for mail addresses or remote logins. |
| 25 | ** EX_NOHOST -- The host specified did not exist. This is used |
| 26 | ** in mail addresses or network requests. |
| 27 | ** EX_UNAVAILABLE -- A service is unavailable. This can occur |
| 28 | ** if a support program or file does not exist. This |
| 29 | ** can also be used as a catchall message when something |
| 30 | ** you wanted to do doesn't work, but you don't know |
| 31 | ** why. |
| 32 | ** EX_SOFTWARE -- An internal software error has been detected. |
| 33 | ** This should be limited to non-operating system related |
| 34 | ** errors as possible. |
| 35 | ** EX_OSERR -- An operating system error has been detected. |
| 36 | ** This is intended to be used for such things as "cannot |
| 37 | ** fork", "cannot create pipe", or the like. It includes |
| 38 | ** things like getuid returning a user that does not |
| 39 | ** exist in the passwd file. |
| 40 | ** EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp, |
| 41 | ** etc.) does not exist, cannot be opened, or has some |
| 42 | ** sort of error (e.g., syntax error). |
| 43 | ** EX_CANTCREAT -- A (user specified) output file cannot be |
| 44 | ** created. |
| 45 | ** EX_IOERR -- An error occurred while doing I/O on some file. |
| 46 | ** EX_TEMPFAIL -- temporary failure, indicating something that |
| 47 | ** is not really an error. In sendmail, this means |
| 48 | ** that a mailer (e.g.) could not create a connection, |
| 49 | ** and the request should be reattempted later. |
| 50 | ** EX_PROTOCOL -- the remote system returned something that |
| 51 | ** was "not possible" during a protocol exchange. |
| 52 | ** EX_NOPERM -- You did not have sufficient permission to |
| 53 | ** perform the operation. This is not intended for |
| 54 | ** file system problems, which should use NOINPUT or |
| 55 | ** CANTCREAT, but rather for higher level permissions. |
| 56 | ** For example, kre uses this to restrict who students |
| 57 | ** can send mail to. |
| 58 | ** |
| 59 | ** Maintained by Eric Allman (eric@berkeley, ucbvax!eric) -- |
| 60 | ** please mail changes to me. |
| 61 | ** |
| 62 | ** @(#)sysexits.h 4.2 %G% |
| 63 | */ |
| 64 | |
| 65 | # define EX_OK 0 /* successful termination */ |
| 66 | |
| 67 | # define EX__BASE 64 /* base value for error messages */ |
| 68 | |
| 69 | # define EX_USAGE 64 /* command line usage error */ |
| 70 | # define EX_DATAERR 65 /* data format error */ |
| 71 | # define EX_NOINPUT 66 /* cannot open input */ |
| 72 | # define EX_NOUSER 67 /* addressee unknown */ |
| 73 | # define EX_NOHOST 68 /* host name unknown */ |
| 74 | # define EX_UNAVAILABLE 69 /* service unavailable */ |
| 75 | # define EX_SOFTWARE 70 /* internal software error */ |
| 76 | # define EX_OSERR 71 /* system error (e.g., can't fork) */ |
| 77 | # define EX_OSFILE 72 /* critical OS file missing */ |
| 78 | # define EX_CANTCREAT 73 /* can't create (user) output file */ |
| 79 | # define EX_IOERR 74 /* input/output error */ |
| 80 | # define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ |
| 81 | # define EX_PROTOCOL 76 /* remote error in protocol */ |
| 82 | # define EX_NOPERM 77 /* permission denied */ |