1N/A/*
1N/A * Copyright (c) 2001 Sendmail, Inc. and its suppliers.
1N/A * All rights reserved.
1N/A * Copyright (c) 1987, 1993
1N/A * The Regents of the University of California. All rights reserved.
1N/A *
1N/A * By using this file, you agree to the terms and conditions set
1N/A * forth in the LICENSE file which can be found at the top level of
1N/A * the sendmail distribution.
1N/A *
1N/A * $Id: sysexits.h,v 1.5 2001/03/10 17:30:01 ca Exp $
1N/A * @(#)sysexits.h 8.1 (Berkeley) 6/2/93
1N/A */
1N/A
1N/A#pragma ident "%Z%%M% %I% %E% SMI"
1N/A
1N/A#ifndef SM_SYSEXITS_H
1N/A# define SM_SYSEXITS_H
1N/A
1N/A# include <sm/gen.h>
1N/A
1N/A/*
1N/A** SYSEXITS.H -- Exit status codes for system programs.
1N/A**
1N/A** This include file attempts to categorize possible error
1N/A** exit statuses for system programs, notably delivermail
1N/A** and the Berkeley network.
1N/A**
1N/A** Error numbers begin at EX__BASE to reduce the possibility of
1N/A** clashing with other exit statuses that random programs may
1N/A** already return. The meaning of the codes is approximately
1N/A** as follows:
1N/A**
1N/A** EX_USAGE -- The command was used incorrectly, e.g., with
1N/A** the wrong number of arguments, a bad flag, a bad
1N/A** syntax in a parameter, or whatever.
1N/A** EX_DATAERR -- The input data was incorrect in some way.
1N/A** This should only be used for user's data & not
1N/A** system files.
1N/A** EX_NOINPUT -- An input file (not a system file) did not
1N/A** exist or was not readable. This could also include
1N/A** errors like "No message" to a mailer (if it cared
1N/A** to catch it).
1N/A** EX_NOUSER -- The user specified did not exist. This might
1N/A** be used for mail addresses or remote logins.
1N/A** EX_NOHOST -- The host specified did not exist. This is used
1N/A** in mail addresses or network requests.
1N/A** EX_UNAVAILABLE -- A service is unavailable. This can occur
1N/A** if a support program or file does not exist. This
1N/A** can also be used as a catchall message when something
1N/A** you wanted to do doesn't work, but you don't know
1N/A** why.
1N/A** EX_SOFTWARE -- An internal software error has been detected.
1N/A** This should be limited to non-operating system related
1N/A** errors as possible.
1N/A** EX_OSERR -- An operating system error has been detected.
1N/A** This is intended to be used for such things as "cannot
1N/A** fork", "cannot create pipe", or the like. It includes
1N/A** things like getuid returning a user that does not
1N/A** exist in the passwd file.
1N/A** EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp,
1N/A** etc.) does not exist, cannot be opened, or has some
1N/A** sort of error (e.g., syntax error).
1N/A** EX_CANTCREAT -- A (user specified) output file cannot be
1N/A** created.
1N/A** EX_IOERR -- An error occurred while doing I/O on some file.
1N/A** EX_TEMPFAIL -- temporary failure, indicating something that
1N/A** is not really an error. In sendmail, this means
1N/A** that a mailer (e.g.) could not create a connection,
1N/A** and the request should be reattempted later.
1N/A** EX_PROTOCOL -- the remote system returned something that
1N/A** was "not possible" during a protocol exchange.
1N/A** EX_NOPERM -- You did not have sufficient permission to
1N/A** perform the operation. This is not intended for
1N/A** file system problems, which should use NOINPUT or
1N/A** CANTCREAT, but rather for higher level permissions.
1N/A*/
1N/A
1N/A# if SM_CONF_SYSEXITS_H
1N/A# include <sysexits.h>
1N/A# else /* SM_CONF_SYSEXITS_H */
1N/A
1N/A# define EX_OK 0 /* successful termination */
1N/A
1N/A# define EX__BASE 64 /* base value for error messages */
1N/A
1N/A# define EX_USAGE 64 /* command line usage error */
1N/A# define EX_DATAERR 65 /* data format error */
1N/A# define EX_NOINPUT 66 /* cannot open input */
1N/A# define EX_NOUSER 67 /* addressee unknown */
1N/A# define EX_NOHOST 68 /* host name unknown */
1N/A# define EX_UNAVAILABLE 69 /* service unavailable */
1N/A# define EX_SOFTWARE 70 /* internal software error */
1N/A# define EX_OSERR 71 /* system error (e.g., can't fork) */
1N/A# define EX_OSFILE 72 /* critical OS file missing */
1N/A# define EX_CANTCREAT 73 /* can't create (user) output file */
1N/A# define EX_IOERR 74 /* input/output error */
1N/A# define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */
1N/A# define EX_PROTOCOL 76 /* remote error in protocol */
1N/A# define EX_NOPERM 77 /* permission denied */
1N/A# define EX_CONFIG 78 /* configuration error */
1N/A
1N/A# define EX__MAX 78 /* maximum listed value */
1N/A
1N/A# endif /* SM_CONF_SYSEXITS_H */
1N/A
1N/Aextern char *sm_strexit __P((int));
1N/Aextern char *sm_sysexitmsg __P((int));
1N/Aextern char *sm_sysexmsg __P((int));
1N/A
1N/A#endif /* ! SM_SYSEXITS_H */