|
| 1 | +# SPDX-FileCopyrightText: Stefan Tatschner |
| 2 | +# |
| 3 | +# SPDX-License-Identifier: MIT |
| 4 | +# |
| 5 | +# Preferred system exit codes as defined by sysexits.h |
| 6 | +# |
| 7 | +# Exit code constants intended to be passed to `sys.exit()`; |
| 8 | +# inspired by https://docs.rs/exitcode. |
| 9 | + |
| 10 | +# Successful exit |
| 11 | +OK = 0 |
| 12 | + |
| 13 | +# The command was used incorrectly, e.g., with the |
| 14 | +# wrong number of arguments, a bad flag, a bad syntax |
| 15 | +# in a parameter, etc. |
| 16 | +USAGE = 64 |
| 17 | + |
| 18 | +# The input data was incorrect in some way. This |
| 19 | +# should only be used for user's data and not system |
| 20 | +# files. |
| 21 | +DATAERR = 65 |
| 22 | + |
| 23 | +# An input file (not a system file) did not exist or |
| 24 | +# was not readable. This could also include errors |
| 25 | +# like "No message" to a mailer (if it cared to |
| 26 | +# catch it). |
| 27 | +NOINPUT = 66 |
| 28 | + |
| 29 | +# The user specified did not exist. This might be |
| 30 | +# used for mail addresses or remote logins. |
| 31 | +NOUSER = 67 |
| 32 | + |
| 33 | +# The host specified did not exist. This is used in |
| 34 | +# mail addresses or network requests. |
| 35 | +NOHOST = 68 |
| 36 | + |
| 37 | +# A service is unavailable. This can occur if a |
| 38 | +# support program or file does not exist. This can also |
| 39 | +# be used as a catchall message when something you |
| 40 | +# wanted to do doesn't work, but you don't know why. |
| 41 | +UNAVAILABLE = 69 |
| 42 | + |
| 43 | +# An internal software error has been detected. This |
| 44 | +# should be limited to non-operating system related |
| 45 | +# errors as possible. |
| 46 | +SOFTWARE = 70 |
| 47 | + |
| 48 | +# An operating system error has been detected. This |
| 49 | +# is intended to be used for such things as "cannot |
| 50 | +# fork", "cannot create pipe", or the like. It |
| 51 | +# includes things like getuid returning a user that |
| 52 | +# does not exist in the passwd file. |
| 53 | +OSERR = 71 |
| 54 | + |
| 55 | +# Some system file (e.g., /etc/passwd, /var/run/utmp, |
| 56 | +# etc.) does not exist, cannot be opened, or has some |
| 57 | +# sort of error (e.g., syntax error). |
| 58 | +OSFILE = 72 |
| 59 | + |
| 60 | +# A (user specified) output file cannot be created. |
| 61 | +CANTCREAT = 73 |
| 62 | + |
| 63 | +# An error occurred while doing I/O on some file. |
| 64 | +IOERR = 74 |
| 65 | + |
| 66 | +# Temporary failure, indicating something that is not |
| 67 | +# really an error. In sendmail, this means that a |
| 68 | +# mailer (e.g.) could not create a connection, and |
| 69 | +# the request should be reattempted later. |
| 70 | +TEMPFAIL = 75 |
| 71 | + |
| 72 | +# The remote system returned something that was |
| 73 | +# "not possible" during a protocol exchange. |
| 74 | +PROTOCOL = 76 |
| 75 | + |
| 76 | +# You did not have sufficient permission to perform |
| 77 | +# the operation. This is not intended for file system |
| 78 | +# problems, which should use `NOINPUT` or `CANTCREAT`, |
| 79 | +# but rather for higher level permissions. |
| 80 | +NOPERM = 77 |
| 81 | + |
| 82 | +# Something was found in an unconfigured or misconfigured state. |
| 83 | +CONFIG = 78 |
0 commit comments