00001 /* 00002 * Copyright (c) 1987, 1993 00003 * The Regents of the University of California. All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions 00007 * are met: 00008 * 1. Redistributions of source code must retain the above copyright 00009 * notice, this list of conditions and the following disclaimer. 00010 * 2. Redistributions in binary form must reproduce the above copyright 00011 * notice, this list of conditions and the following disclaimer in the 00012 * documentation and/or other materials provided with the distribution. 00013 * 3. All advertising materials mentioning features or use of this software 00014 * must display the following acknowledgement: 00015 * This product includes software developed by the University of 00016 * California, Berkeley and its contributors. 00017 * 4. Neither the name of the University nor the names of its contributors 00018 * may be used to endorse or promote products derived from this software 00019 * without specific prior written permission. 00020 * 00021 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 00022 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00023 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00024 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 00025 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00026 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00027 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00028 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00029 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00030 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00031 * SUCH DAMAGE. 00032 * 00033 * @(#)sysexits.h 8.1 (Berkeley) 6/2/93 00034 */ 00035 00036 #ifndef _SYSEXITS_H_ 00037 #define _SYSEXITS_H_ 00038 00039 /* 00040 * SYSEXITS.H -- Exit status codes for system programs. 00041 * 00042 * This include file attempts to categorize possible error 00043 * exit statuses for system programs, notably delivermail 00044 * and the Berkeley network. 00045 * 00046 * Error numbers begin at EX__BASE to reduce the possibility of 00047 * clashing with other exit statuses that random programs may 00048 * already return. The meaning of the codes is approximately 00049 * as follows: 00050 * 00051 * EX_USAGE -- The command was used incorrectly, e.g., with 00052 * the wrong number of arguments, a bad flag, a bad 00053 * syntax in a parameter, or whatever. 00054 * EX_DATAERR -- The input data was incorrect in some way. 00055 * This should only be used for user's data & not 00056 * system files. 00057 * EX_NOINPUT -- An input file (not a system file) did not 00058 * exist or was not readable. This could also include 00059 * errors like "No message" to a mailer (if it cared 00060 * to catch it). 00061 * EX_NOUSER -- The user specified did not exist. This might 00062 * be used for mail addresses or remote logins. 00063 * EX_NOHOST -- The host specified did not exist. This is used 00064 * in mail addresses or network requests. 00065 * EX_UNAVAILABLE -- A service is unavailable. This can occur 00066 * if a support program or file does not exist. This 00067 * can also be used as a catchall message when something 00068 * you wanted to do doesn't work, but you don't know 00069 * why. 00070 * EX_SOFTWARE -- An internal software error has been detected. 00071 * This should be limited to non-operating system related 00072 * errors as possible. 00073 * EX_OSERR -- An operating system error has been detected. 00074 * This is intended to be used for such things as "cannot 00075 * fork", "cannot create pipe", or the like. It includes 00076 * things like getuid returning a user that does not 00077 * exist in the passwd file. 00078 * EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp, 00079 * etc.) does not exist, cannot be opened, or has some 00080 * sort of error (e.g., syntax error). 00081 * EX_CANTCREAT -- A (user specified) output file cannot be 00082 * created. 00083 * EX_IOERR -- An error occurred while doing I/O on some file. 00084 * EX_TEMPFAIL -- temporary failure, indicating something that 00085 * is not really an error. In sendmail, this means 00086 * that a mailer (e.g.) could not create a connection, 00087 * and the request should be reattempted later. 00088 * EX_PROTOCOL -- the remote system returned something that 00089 * was "not possible" during a protocol exchange. 00090 * EX_NOPERM -- You did not have sufficient permission to 00091 * perform the operation. This is not intended for 00092 * file system problems, which should use NOINPUT or 00093 * CANTCREAT, but rather for higher level permissions. 00094 */ 00095 00096 #define EX_OK 0 /* successful termination */ 00097 00098 #define EX__BASE 64 /* base value for error messages */ 00099 00100 #define EX_USAGE 64 /* command line usage error */ 00101 #define EX_DATAERR 65 /* data format error */ 00102 #define EX_NOINPUT 66 /* cannot open input */ 00103 #define EX_NOUSER 67 /* addressee unknown */ 00104 #define EX_NOHOST 68 /* host name unknown */ 00105 #define EX_UNAVAILABLE 69 /* service unavailable */ 00106 #define EX_SOFTWARE 70 /* internal software error */ 00107 #define EX_OSERR 71 /* system error (e.g., can't fork) */ 00108 #define EX_OSFILE 72 /* critical OS file missing */ 00109 #define EX_CANTCREAT 73 /* can't create (user) output file */ 00110 #define EX_IOERR 74 /* input/output error */ 00111 #define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ 00112 #define EX_PROTOCOL 76 /* remote error in protocol */ 00113 #define EX_NOPERM 77 /* permission denied */ 00114 #define EX_CONFIG 78 /* configuration error */ 00115 00116 #define EX__MAX 78 /* maximum listed value */ 00117 00118 #endif /* !_SYSEXITS_H_ */