]>
Commit | Line | Data |
---|---|---|
d7ce7006 | 1 | /** @file contains exit code definitions for exiting systems applications.\r |
2 | \r | |
3 | These exit codes are an extension beyond the two values specified by\r | |
4 | ISO/IEC 9899:199409 and defined in <stdlib.h>.\r | |
5 | \r | |
6 | * Copyright (c) 1987, 1993\r | |
7 | * The Regents of the University of California. All rights reserved.\r | |
8 | *\r | |
9 | * Redistribution and use in source and binary forms, with or without\r | |
10 | * modification, are permitted provided that the following conditions\r | |
11 | * are met:\r | |
12 | * 1. Redistributions of source code must retain the above copyright\r | |
13 | * notice, this list of conditions and the following disclaimer.\r | |
14 | * 2. Redistributions in binary form must reproduce the above copyright\r | |
15 | * notice, this list of conditions and the following disclaimer in the\r | |
16 | * documentation and/or other materials provided with the distribution.\r | |
17 | * 3. All advertising materials mentioning features or use of this software\r | |
18 | * must display the following acknowledgement:\r | |
19 | * This product includes software developed by the University of\r | |
20 | * California, Berkeley and its contributors.\r | |
21 | * 4. Neither the name of the University nor the names of its contributors\r | |
22 | * may be used to endorse or promote products derived from this software\r | |
23 | * without specific prior written permission.\r | |
24 | *\r | |
25 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\r | |
26 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r | |
27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r | |
28 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\r | |
29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\r | |
30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\r | |
31 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\r | |
32 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r | |
33 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\r | |
34 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\r | |
35 | * SUCH DAMAGE.\r | |
36 | *\r | |
37 | * @(#)sysexits.h 8.1 (Berkeley) 6/2/93\r | |
38 | */\r | |
39 | \r | |
40 | #ifndef _SYSEXITS_H_\r | |
41 | #define _SYSEXITS_H_\r | |
42 | \r | |
43 | /*\r | |
44 | * SYSEXITS.H -- Exit status codes for system programs.\r | |
45 | *\r | |
46 | * This include file attempts to categorize possible error\r | |
47 | * exit statuses for system programs, notably delivermail\r | |
48 | * and the Berkeley network.\r | |
49 | *\r | |
50 | * Error numbers begin at EX__BASE to reduce the possibility of\r | |
51 | * clashing with other exit statuses that random programs may\r | |
52 | * already return. The meaning of the codes is approximately\r | |
53 | * as follows:\r | |
54 | *\r | |
55 | * EX_USAGE -- The command was used incorrectly, e.g., with\r | |
56 | * the wrong number of arguments, a bad flag, a bad\r | |
57 | * syntax in a parameter, or whatever.\r | |
58 | * EX_DATAERR -- The input data was incorrect in some way.\r | |
59 | * This should only be used for user's data & not\r | |
60 | * system files.\r | |
61 | * EX_NOINPUT -- An input file (not a system file) did not\r | |
62 | * exist or was not readable. This could also include\r | |
63 | * errors like "No message" to a mailer (if it cared\r | |
64 | * to catch it).\r | |
65 | * EX_NOUSER -- The user specified did not exist. This might\r | |
66 | * be used for mail addresses or remote logins.\r | |
67 | * EX_NOHOST -- The host specified did not exist. This is used\r | |
68 | * in mail addresses or network requests.\r | |
69 | * EX_UNAVAILABLE -- A service is unavailable. This can occur\r | |
70 | * if a support program or file does not exist. This\r | |
71 | * can also be used as a catchall message when something\r | |
72 | * you wanted to do doesn't work, but you don't know\r | |
73 | * why.\r | |
74 | * EX_SOFTWARE -- An internal software error has been detected.\r | |
75 | * This should be limited to non-operating system related\r | |
76 | * errors as possible.\r | |
77 | * EX_OSERR -- An operating system error has been detected.\r | |
78 | * This is intended to be used for such things as "cannot\r | |
79 | * fork", "cannot create pipe", or the like. It includes\r | |
80 | * things like getuid returning a user that does not\r | |
81 | * exist in the passwd file.\r | |
82 | * EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp,\r | |
83 | * etc.) does not exist, cannot be opened, or has some\r | |
84 | * sort of error (e.g., syntax error).\r | |
85 | * EX_CANTCREAT -- A (user specified) output file cannot be\r | |
86 | * created.\r | |
87 | * EX_IOERR -- An error occurred while doing I/O on some file.\r | |
88 | * EX_TEMPFAIL -- temporary failure, indicating something that\r | |
89 | * is not really an error. In sendmail, this means\r | |
90 | * that a mailer (e.g.) could not create a connection,\r | |
91 | * and the request should be reattempted later.\r | |
92 | * EX_PROTOCOL -- the remote system returned something that\r | |
93 | * was "not possible" during a protocol exchange.\r | |
94 | * EX_NOPERM -- You did not have sufficient permission to\r | |
95 | * perform the operation. This is not intended for\r | |
96 | * file system problems, which should use NOINPUT or\r | |
97 | * CANTCREAT, but rather for higher level permissions.\r | |
98 | */\r | |
99 | \r | |
100 | #define EX_OK 0 /* successful termination */\r | |
101 | \r | |
102 | #define EX__BASE 64 /* base value for error messages */\r | |
103 | \r | |
104 | #define EX_USAGE 64 /* command line usage error */\r | |
105 | #define EX_DATAERR 65 /* data format error */\r | |
106 | #define EX_NOINPUT 66 /* cannot open input */\r | |
107 | #define EX_NOUSER 67 /* addressee unknown */\r | |
108 | #define EX_NOHOST 68 /* host name unknown */\r | |
109 | #define EX_UNAVAILABLE 69 /* service unavailable */\r | |
110 | #define EX_SOFTWARE 70 /* internal software error */\r | |
111 | #define EX_OSERR 71 /* system error (e.g., can't fork) */\r | |
112 | #define EX_OSFILE 72 /* critical OS file missing */\r | |
113 | #define EX_CANTCREAT 73 /* can't create (user) output file */\r | |
114 | #define EX_IOERR 74 /* input/output error */\r | |
115 | #define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */\r | |
116 | #define EX_PROTOCOL 76 /* remote error in protocol */\r | |
117 | #define EX_NOPERM 77 /* permission denied */\r | |
118 | #define EX_CONFIG 78 /* configuration error */\r | |
119 | \r | |
120 | #define EX__MAX 78 /* maximum listed value */\r | |
121 | \r | |
122 | #endif /* !_SYSEXITS_H_ */\r |