williamr@2: /* williamr@2: * Copyright (c) 1987, 1993 williamr@2: * The Regents of the University of California. All rights reserved. williamr@2: * williamr@2: * Redistribution and use in source and binary forms, with or without williamr@2: * modification, are permitted provided that the following conditions williamr@2: * are met: williamr@2: * 1. Redistributions of source code must retain the above copyright williamr@2: * notice, this list of conditions and the following disclaimer. williamr@2: * 2. Redistributions in binary form must reproduce the above copyright williamr@2: * notice, this list of conditions and the following disclaimer in the williamr@2: * documentation and/or other materials provided with the distribution. williamr@2: * 4. Neither the name of the University nor the names of its contributors williamr@2: * may be used to endorse or promote products derived from this software williamr@2: * without specific prior written permission. williamr@2: * williamr@2: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND williamr@2: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE williamr@2: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE williamr@2: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE williamr@2: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL williamr@2: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS williamr@2: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) williamr@2: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT williamr@2: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY williamr@2: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF williamr@2: * SUCH DAMAGE. williamr@2: * williamr@2: * @(#)sysexits.h 8.1 (Berkeley) 6/2/93 williamr@2: */ williamr@2: williamr@2: #ifndef _SYSEXITS_H_ williamr@2: #define _SYSEXITS_H_ williamr@2: williamr@2: /* williamr@2: * SYSEXITS.H -- Exit status codes for system programs. williamr@2: * williamr@2: * This include file attempts to categorize possible error williamr@2: * exit statuses for system programs, notably delivermail williamr@2: * and the Berkeley network. williamr@2: * williamr@2: * Error numbers begin at EX__BASE to reduce the possibility of williamr@2: * clashing with other exit statuses that random programs may williamr@2: * already return. The meaning of the codes is approximately williamr@2: * as follows: williamr@2: * williamr@2: * EX_USAGE -- The command was used incorrectly, e.g., with williamr@2: * the wrong number of arguments, a bad flag, a bad williamr@2: * syntax in a parameter, or whatever. williamr@2: * EX_DATAERR -- The input data was incorrect in some way. williamr@2: * This should only be used for user's data & not williamr@2: * system files. williamr@2: * EX_NOINPUT -- An input file (not a system file) did not williamr@2: * exist or was not readable. This could also include williamr@2: * errors like "No message" to a mailer (if it cared williamr@2: * to catch it). williamr@2: * EX_NOUSER -- The user specified did not exist. This might williamr@2: * be used for mail addresses or remote logins. williamr@2: * EX_NOHOST -- The host specified did not exist. This is used williamr@2: * in mail addresses or network requests. williamr@2: * EX_UNAVAILABLE -- A service is unavailable. This can occur williamr@2: * if a support program or file does not exist. This williamr@2: * can also be used as a catchall message when something williamr@2: * you wanted to do doesn't work, but you don't know williamr@2: * why. williamr@2: * EX_SOFTWARE -- An internal software error has been detected. williamr@2: * This should be limited to non-operating system related williamr@2: * errors as possible. williamr@2: * EX_OSERR -- An operating system error has been detected. williamr@2: * This is intended to be used for such things as "cannot williamr@2: * fork", "cannot create pipe", or the like. It includes williamr@2: * things like getuid returning a user that does not williamr@2: * exist in the passwd file. williamr@2: * EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp, williamr@2: * etc.) does not exist, cannot be opened, or has some williamr@2: * sort of error (e.g., syntax error). williamr@2: * EX_CANTCREAT -- A (user specified) output file cannot be williamr@2: * created. williamr@2: * EX_IOERR -- An error occurred while doing I/O on some file. williamr@2: * EX_TEMPFAIL -- temporary failure, indicating something that williamr@2: * is not really an error. In sendmail, this means williamr@2: * that a mailer (e.g.) could not create a connection, williamr@2: * and the request should be reattempted later. williamr@2: * EX_PROTOCOL -- the remote system returned something that williamr@2: * was "not possible" during a protocol exchange. williamr@2: * EX_NOPERM -- You did not have sufficient permission to williamr@2: * perform the operation. This is not intended for williamr@2: * file system problems, which should use NOINPUT or williamr@2: * CANTCREAT, but rather for higher level permissions. williamr@2: */ williamr@2: williamr@2: #define EX_OK 0 /* successful termination */ williamr@2: williamr@2: #define EX__BASE 64 /* base value for error messages */ williamr@2: williamr@2: #define EX_USAGE 64 /* command line usage error */ williamr@2: #define EX_DATAERR 65 /* data format error */ williamr@2: #define EX_NOINPUT 66 /* cannot open input */ williamr@2: #define EX_NOUSER 67 /* addressee unknown */ williamr@2: #define EX_NOHOST 68 /* host name unknown */ williamr@2: #define EX_UNAVAILABLE 69 /* service unavailable */ williamr@2: #define EX_SOFTWARE 70 /* internal software error */ williamr@2: #define EX_OSERR 71 /* system error (e.g., can't fork) */ williamr@2: #define EX_OSFILE 72 /* critical OS file missing */ williamr@2: #define EX_CANTCREAT 73 /* can't create (user) output file */ williamr@2: #define EX_IOERR 74 /* input/output error */ williamr@2: #define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ williamr@2: #define EX_PROTOCOL 76 /* remote error in protocol */ williamr@2: #define EX_NOPERM 77 /* permission denied */ williamr@2: #define EX_CONFIG 78 /* configuration error */ williamr@2: williamr@2: #define EX__MAX 78 /* maximum listed value */ williamr@2: williamr@2: #endif /* !_SYSEXITS_H_ */