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