date and time created 82/08/16 22:20:28 by sam
[unix-history] / usr / src / include / sysexits.h
CommitLineData
63f37ee4
EA
1/*
2** SYSEXITS.H -- Exit status codes for system programs.
3**
4** This include file attempts to categorize possible error
5** exit statuses for system programs, notably delivermail
6** and the Berkeley network.
7**
8** Error numbers begin at EX__BASE to reduce the possibility of
9** clashing with other exit statuses that random programs may
10** already return. The meaning of the codes is approximately
11** as follows:
12**
13** EX_USAGE -- The command was used incorrectly, e.g., with
14** the wrong number of arguments, a bad flag, a bad
15** syntax in a parameter, or whatever.
16** EX_DATAERR -- The input data was incorrect in some way.
17** This should only be used for user's data & not
18** system files.
19** EX_NOINPUT -- An input file (not a system file) did not
20** exist or was not readable. This could also include
21** errors like "No message" to a mailer (if it cared
22** to catch it).
23** EX_NOUSER -- The user specified did not exist. This might
24** be used for mail addresses or remote logins.
25** EX_NOHOST -- The host specified did not exist. This is used
26** in mail addresses or network requests.
27** EX_UNAVAILABLE -- A service is unavailable. This can occur
28** if a support program or file does not exist. This
29** can also be used as a catchall message when something
30** you wanted to do doesn't work, but you don't know
31** why.
32** EX_SOFTWARE -- An internal software error has been detected.
33** This should be limited to non-operating system related
34** errors as possible.
35** EX_OSERR -- An operating system error has been detected.
36** This is intended to be used for such things as "cannot
37** fork", "cannot create pipe", or the like. It includes
38** things like getuid returning a user that does not
39** exist in the passwd file.
40** EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp,
41** etc.) does not exist, cannot be opened, or has some
42** sort of error (e.g., syntax error).
43** EX_CANTCREAT -- A (user specified) output file cannot be
44** created.
45** EX_IOERR -- An error occurred while doing I/O on some file.
8476145b
EA
46** EX_TEMPFAIL -- temporary failure, indicating something that
47** is not really an error. In sendmail, this means
48** that a mailer (e.g.) could not create a connection,
49** and the request should be reattempted later.
50**
51** Maintained by IngVAX:eric (eric@berkeley, ucbvax!eric) --
52** please mail changes to me.
1e27e2a9
EA
53**
54** @(#)sysexits.h 1.3 %G%
63f37ee4
EA
55*/
56
57# define EX_OK 0 /* successful termination */
58
59# define EX__BASE 64 /* base value for error messages */
60
61# define EX_USAGE 64 /* command line usage error */
62# define EX_DATAERR 65 /* data format error */
63# define EX_NOINPUT 66 /* cannot open input */
64# define EX_NOUSER 67 /* addressee unknown */
65# define EX_NOHOST 68 /* host name unknown */
66# define EX_UNAVAILABLE 69 /* service unavailable */
67# define EX_SOFTWARE 70 /* internal software error */
68# define EX_OSERR 71 /* system error (e.g., can't fork) */
69# define EX_OSFILE 72 /* critical OS file missing */
70# define EX_CANTCREAT 73 /* can't create (user) output file */
71# define EX_IOERR 74 /* input/output error */
8476145b 72# define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */