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