sysexits.h revision 1539
1230557Sjimharris/* 2230557Sjimharris * Copyright (c) 1987, 1993 3230557Sjimharris * The Regents of the University of California. All rights reserved. 4230557Sjimharris * 5230557Sjimharris * Redistribution and use in source and binary forms, with or without 6230557Sjimharris * modification, are permitted provided that the following conditions 7230557Sjimharris * are met: 8230557Sjimharris * 1. Redistributions of source code must retain the above copyright 9230557Sjimharris * notice, this list of conditions and the following disclaimer. 10230557Sjimharris * 2. Redistributions in binary form must reproduce the above copyright 11230557Sjimharris * notice, this list of conditions and the following disclaimer in the 12230557Sjimharris * documentation and/or other materials provided with the distribution. 13230557Sjimharris * 3. All advertising materials mentioning features or use of this software 14230557Sjimharris * must display the following acknowledgement: 15230557Sjimharris * This product includes software developed by the University of 16230557Sjimharris * California, Berkeley and its contributors. 17230557Sjimharris * 4. Neither the name of the University nor the names of its contributors 18230557Sjimharris * may be used to endorse or promote products derived from this software 19230557Sjimharris * without specific prior written permission. 20230557Sjimharris * 21230557Sjimharris * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22230557Sjimharris * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23230557Sjimharris * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24230557Sjimharris * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25230557Sjimharris * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26230557Sjimharris * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27230557Sjimharris * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28230557Sjimharris * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29230557Sjimharris * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30230557Sjimharris * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31230557Sjimharris * SUCH DAMAGE. 32230557Sjimharris * 33230557Sjimharris * @(#)sysexits.h 8.1 (Berkeley) 6/2/93 34230557Sjimharris */ 35230557Sjimharris 36230557Sjimharris#ifndef _SYSEXITS_H_ 37230557Sjimharris#define _SYSEXITS_H_ 38230557Sjimharris 39230557Sjimharris/* 40230557Sjimharris * SYSEXITS.H -- Exit status codes for system programs. 41230557Sjimharris * 42230557Sjimharris * This include file attempts to categorize possible error 43230557Sjimharris * exit statuses for system programs, notably delivermail 44230557Sjimharris * and the Berkeley network. 45230557Sjimharris * 46230557Sjimharris * Error numbers begin at EX__BASE to reduce the possibility of 47230557Sjimharris * clashing with other exit statuses that random programs may 48230557Sjimharris * already return. The meaning of the codes is approximately 49230557Sjimharris * as follows: 50230557Sjimharris * 51230557Sjimharris * EX_USAGE -- The command was used incorrectly, e.g., with 52230557Sjimharris * the wrong number of arguments, a bad flag, a bad 53230557Sjimharris * syntax in a parameter, or whatever. 54230557Sjimharris * EX_DATAERR -- The input data was incorrect in some way. 55230557Sjimharris * This should only be used for user's data & not 56230557Sjimharris * system files. 57230557Sjimharris * EX_NOINPUT -- An input file (not a system file) did not 58230557Sjimharris * exist or was not readable. This could also include 59230557Sjimharris * errors like "No message" to a mailer (if it cared 60230557Sjimharris * to catch it). 61230557Sjimharris * EX_NOUSER -- The user specified did not exist. This might 62230557Sjimharris * be used for mail addresses or remote logins. 63230557Sjimharris * EX_NOHOST -- The host specified did not exist. This is used 64230557Sjimharris * in mail addresses or network requests. 65230557Sjimharris * EX_UNAVAILABLE -- A service is unavailable. This can occur 66230557Sjimharris * if a support program or file does not exist. This 67230557Sjimharris * can also be used as a catchall message when something 68230557Sjimharris * you wanted to do doesn't work, but you don't know 69230557Sjimharris * why. 70230557Sjimharris * EX_SOFTWARE -- An internal software error has been detected. 71230557Sjimharris * This should be limited to non-operating system related 72230557Sjimharris * errors as possible. 73230557Sjimharris * EX_OSERR -- An operating system error has been detected. 74230557Sjimharris * This is intended to be used for such things as "cannot 75230557Sjimharris * fork", "cannot create pipe", or the like. It includes 76230557Sjimharris * things like getuid returning a user that does not 77230557Sjimharris * exist in the passwd file. 78230557Sjimharris * EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp, 79230557Sjimharris * etc.) does not exist, cannot be opened, or has some 80230557Sjimharris * sort of error (e.g., syntax error). 81 * EX_CANTCREAT -- A (user specified) output file cannot be 82 * created. 83 * EX_IOERR -- An error occurred while doing I/O on some file. 84 * EX_TEMPFAIL -- temporary failure, indicating something that 85 * is not really an error. In sendmail, this means 86 * that a mailer (e.g.) could not create a connection, 87 * and the request should be reattempted later. 88 * EX_PROTOCOL -- the remote system returned something that 89 * was "not possible" during a protocol exchange. 90 * EX_NOPERM -- You did not have sufficient permission to 91 * perform the operation. This is not intended for 92 * file system problems, which should use NOINPUT or 93 * CANTCREAT, but rather for higher level permissions. 94 */ 95 96#define EX_OK 0 /* successful termination */ 97 98#define EX__BASE 64 /* base value for error messages */ 99 100#define EX_USAGE 64 /* command line usage error */ 101#define EX_DATAERR 65 /* data format error */ 102#define EX_NOINPUT 66 /* cannot open input */ 103#define EX_NOUSER 67 /* addressee unknown */ 104#define EX_NOHOST 68 /* host name unknown */ 105#define EX_UNAVAILABLE 69 /* service unavailable */ 106#define EX_SOFTWARE 70 /* internal software error */ 107#define EX_OSERR 71 /* system error (e.g., can't fork) */ 108#define EX_OSFILE 72 /* critical OS file missing */ 109#define EX_CANTCREAT 73 /* can't create (user) output file */ 110#define EX_IOERR 74 /* input/output error */ 111#define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ 112#define EX_PROTOCOL 76 /* remote error in protocol */ 113#define EX_NOPERM 77 /* permission denied */ 114#define EX_CONFIG 78 /* configuration error */ 115 116#define EX__MAX 78 /* maximum listed value */ 117 118#endif /* !_SYSEXITS_H_ */ 119