2 .\" Copyright (c) 1996 Joerg Wunsch
3 .\" Copyright (c) 2022 Alejandro Colomar <alx@kernel.org>
5 .\" All rights reserved.
7 .\" SPDX-License-Identifier: BSD-2-Clause
9 .\" Rewritten for the Linux man-pages by Alejandro Colomar
11 .TH sysexits.h 3head (date) "Linux man-pages (unreleased)"
13 sysexits.h \- exit codes for programs
19 .B #include <sysexits.h>
24 successful termination */
27 #define EX__BASE 64 /* T{
28 base value for error messages */
31 #define EX_USAGE 64 /* T{
32 command line usage error */
34 #define EX_DATAERR 65 /* T{
37 #define EX_NOINPUT 66 /* T{
40 #define EX_NOUSER 67 /* T{
43 #define EX_NOHOST 68 /* T{
46 #define EX_UNAVAILABLE 69 /* T{
47 service unavailable */
49 #define EX_SOFTWARE 70 /* T{
50 internal software error */
52 #define EX_OSERR 71 /* T{
53 system error (e.g., can't fork) */
55 #define EX_OSFILE 72 /* T{
56 critical OS file missing */
58 #define EX_CANTCREAT 73 /* T{
59 can't create (user) output file */
61 #define EX_IOERR 74 /* T{
64 #define EX_TEMPFAIL 75 /* T{
65 temp failure; user is invited to retry */
67 #define EX_PROTOCOL 76 /* T{
68 remote error in protocol */
70 #define EX_NOPERM 77 /* T{
73 #define EX_CONFIG 78 /* T{
74 configuration error */
79 #define EX__MAX ... /* T{
80 maximum listed value */
84 A few programs exit with the following error codes.
86 The successful exit is always indicated by a status of
94 Error numbers begin at
96 to reduce the possibility of clashing with other exit statuses
97 that random programs may already return.
98 The meaning of the code is approximately as follows:
101 The command was used incorrectly,
103 with the wrong number of arguments,
105 bad syntax in a parameter,
109 The input data was incorrect in some way.
110 This should only be used for user's data and not system files.
113 An input file (not a system file) did not exist or was not readable.
114 This could also include errors like "No message" to a mailer
115 (if it cared to catch it).
118 The user specified did not exist.
119 This might be used for mail addresses or remote logins.
122 The host specified did not exist.
123 This is used in mail addresses or network requests.
126 A service is unavailable.
127 This can occur if a support program or file does not exist.
128 This can also be used as a catch-all message
129 when something you wanted to do doesn't work, but you don't know why.
132 An internal software error has been detected.
133 This should be limited to non-operating system related errors if possible.
136 An operating system error has been detected.
137 This is intended to be used for such things as
139 "cannot create pipe",
141 It includes things like
143 returning a user that does not exist in the
155 or has some sort of error (e.g., syntax error).
158 A (user specified) output file cannot be created.
161 An error occurred while doing I/O on some file.
165 indicating something that is not really an error.
166 For example that a mailer could not create a connection,
167 and the request should be reattempted later.
170 The remote system returned something that
171 was "not possible" during a protocol exchange.
174 You did not have sufficient permission to perform the operation.
175 This is not intended for file system problems,
180 but rather for higher level permissions.
183 Something was found in an unconfigured or misconfigured state.
185 The numerical values corresponding to the symbolical ones
186 are given in parenthesis for easy reference.
192 file appeared in 4.0BSD for use by the deliverymail utility,
196 The choice of an appropriate exit value is often ambiguous.