SYSEXITS(3)
πΈ NAME πΈ
sysexits β legacy exit status codes for system programs.
Okay bestie, this is the SYSEXITS(3) page from the Library Functions Manual, and we're about to make these codes make sense. β¨
β¨ SYNOPSIS β¨
#include <sysexits.h>
π DESCRIPTION π
Some commands attempt to describe the nature of a failure condition by using these pre-defined exit codes. Iconic in theory, but listen:
Deprecated alert, fr fr: this interface has been deprecated and is retained only for compatibility. Its use is discouraged. π
π₯ ERRORS π₯
The successful exit is always indicated by a status of 0, or EX_OK. Slay.
Error numbers begin at EX__BASE to reduce the possibility of clashing with other exit statuses that random programs may already return. The meaning of the codes is approximately as follows:
EX_USAGE(64) β the command was used incorrectly, e.g., with the wrong number of arguments, a bad flag, a bad syntax in a parameter, or whatever. Basically: user error, bestie.EX_DATAERR(65) β the input data was incorrect in some way. This should only be used for user's data and not system files.EX_NOINPUT(66) β an input file (not a system file) did not exist or was not readable. This could also include errors like βNo messageβ to a mailer (if it cared to catch it).EX_NOUSER(67) β the user specified did not exist. This might be used for mail addresses or remote logins.EX_NOHOST(68) β the host specified did not exist. This is used in mail addresses or network requests.EX_UNAVAILABLE(69) β a service is unavailable. This can occur if a support program or file does not exist. This can also be used as a catchall message when something you wanted to do does not work, but you do not know why. the βidk bestie it just didn't workβ codeEX_SOFTWARE(70) β an internal software error has been detected. This should be limited to non-operating system related errors as possible.EX_OSERR(71) β an operating system error has been detected. This is intended to be used for such things as βcannot forkβ, βcannot create pipeβ, or the like. It includes things likegetuidreturning a user that does not exist in the passwd file.EX_OSFILE(72) β some system file (e.g.,/etc/passwd,/var/run/utx.active, etc.) does not exist, cannot be opened, or has some sort of error (e.g., syntax error).EX_CANTCREAT(73) β a (user specified) output file cannot be created.EX_IOERR(74) β an error occurred while doing I/O on some file.EX_TEMPFAIL(75) β temporary failure, indicating something that is not really an error. Insendmail, this means that a mailer (e.g.) could not create a connection, and the request should be reattempted later.EX_PROTOCOL(76) β the remote system returned something that was βnot possibleβ during a protocol exchange.EX_NOPERM(77) β you did not have sufficient permission to perform the operation. This is not intended for file system problems, which should useEX_NOINPUTorEX_CANTCREAT, but rather for higher level permissions.EX_CONFIG(78) β something was found in an unconfigured or misconfigured state.
The numerical values corresponding to the symbolical ones are given in parenthesis for easy reference. You're welcome π
π¦ SEE ALSO π¦
π HISTORY π
The sysexits file first appeared in 4BSD.
π AUTHORS π
This manual page was written by JΓΆrg Wunsch.
π BUGS π
This interface is not portable.
The choice of an appropriate exit value is often ambiguous. ngl, relatable
xoxo, this was the Debian SYSEXITS(3) page, dated May 9, 2024 β mwah ππ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- π the page's license: BSD-2-Clause
- Copyright (c) 1996 Joerg Wunsch. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms