summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-07-29 14:56:36 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-07-29 14:56:46 +0200
commit5c7dacc3e2cb6cb92db3f96727b95d65dbc11161 (patch)
treeb145cede46ef7d8edcca7ea1a29f8cff5a3bc2b0
parent5fa2ecb53656c9fdcbd5a21972906e3da33cb504 (diff)
sysexits.h.3head: Move header page to a new man3head section
Use man3head, as other Unix systems already use. As Ingo said, man0 is not the right place for header files. Also, this patch does some changes to the page itself: Expand the SYNOPSIS to have together all of the values. Also, add a small comment about the constant (taken from the header file). Link: <https://lore.kernel.org/linux-man/11110a04-f96b-0d32-53e3-adcce618c543@gmail.com/> Cc: "G. Branden Robinson" <g.branden.robinson@gmail.com> Cc: Ingo Schwarze <schwarze@openbsd.org> Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rw-r--r--man3head/sysexits.h.3head (renamed from man0/sysexits.h.0)96
1 files changed, 79 insertions, 17 deletions
diff --git a/man0/sysexits.h.0 b/man3head/sysexits.h.3head
index 7957b435a..47ad32a51 100644
--- a/man0/sysexits.h.0
+++ b/man3head/sysexits.h.3head
@@ -7,13 +7,75 @@
.\"
.\" Rewritten for the Linux man-pages by Alejandro Colomar
.\"
-.TH SYSEXITS.H 0 2022-01-23 GNU "Linux Programmer's Manual"
+.TH sysexits.h 3head 2022-07-29 GNU "Linux Programmer's Manual"
.SH NAME
-sysexits \- exit codes for programs
+sysexits.h \- exit codes for programs
.SH SYNOPSIS
.nf
.B #include <sysexits.h>
.fi
+.TS
+lB2 lB2 l1 lX.
+#define EX_OK 0 /* T{
+successful termination */
+T}
+.PP
+#define EX__BASE 64 /* T{
+base value for error messages */
+T}
+.PP
+#define EX_USAGE 64 /* T{
+command line usage error */
+T}
+#define EX_DATAERR 65 /* T{
+data format error */
+T}
+#define EX_NOINPUT 66 /* T{
+cannot open input */
+T}
+#define EX_NOUSER 67 /* T{
+addressee unknown */
+T}
+#define EX_NOHOST 68 /* T{
+host name unknown */
+T}
+#define EX_UNAVAILABLE 69 /* T{
+service unavailable */
+T}
+#define EX_SOFTWARE 70 /* T{
+internal software error */
+T}
+#define EX_OSERR 71 /* T{
+system error (e.g., can't fork) */
+T}
+#define EX_OSFILE 72 /* T{
+critical OS file missing */
+T}
+#define EX_CANTCREAT 73 /* T{
+can't create (user) output file */
+T}
+#define EX_IOERR 74 /* T{
+input/output error */
+T}
+#define EX_TEMPFAIL 75 /* T{
+temp failure; user is invited to retry */
+T}
+#define EX_PROTOCOL 76 /* T{
+remote error in protocol */
+T}
+#define EX_NOPERM 77 /* T{
+permission denied */
+T}
+#define EX_CONFIG 78 /* T{
+configuration error */
+T}
+.PP
+.T&
+lB2 l2 l1 lX.
+#define EX__MAX ... /* T{
+maximum listed value */
+T}
+.TE
.SH DESCRIPTION
A few programs exit with the following error codes.
.PP
@@ -31,7 +93,7 @@ to reduce the possibility of clashing with other exit statuses
that random programs may already return.
The meaning of the code is approximately as follows:
.TP
-.BR EX_USAGE " (" 64 )
+.B EX_USAGE
The command was used incorrectly,
e.g.,
with the wrong number of arguments,
@@ -39,34 +101,34 @@ a bad flag,
bad syntax in a parameter,
or whatever.
.TP
-.BR EX_DATAERR " (" 65 )
+.B EX_DATAERR
The input data was incorrect in some way.
This should only be used for user's data and not system files.
.TP
-.BR EX_NOINPUT " (" 66 )
+.B EX_NOINPUT
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).
.TP
-.BR EX_NOUSER " (" 67 )
+.B EX_NOUSER
The user specified did not exist.
This might be used for mail addresses or remote logins.
.TP
-.BR EX_NOHOST " (" 68 )
+.B EX_NOHOST
The host specified did not exist.
This is used in mail addresses or network requests.
.TP
-.BR EX_UNAVAILABLE " (" 69 )
+.B EX_UNAVAILABLE
A service is unavailable.
This can occur if a support program or file does not exist.
This can also be used as a catch-all message
when something you wanted to do doesn't work, but you don't know why.
.TP
-.BR EX_SOFTWARE " (" 70 )
+.B EX_SOFTWARE
An internal software error has been detected.
This should be limited to non-operating system related errors if possible.
.TP
-.BR EX_OSERR " (" 71 )
+.B EX_OSERR
An operating system error has been detected.
This is intended to be used for such things as
"cannot fork",
@@ -78,7 +140,7 @@ returning a user that does not exist in the
.BR passwd (5)
file.
.TP
-.BR EX_OSFILE " (" 72 )
+.B EX_OSFILE
Some system file
(e.g.,
.IR /etc/passwd ,
@@ -88,23 +150,23 @@ does not exist,
cannot be opened,
or has some sort of error (e.g., syntax error).
.TP
-.BR EX_CANTCREAT " (" 73 )
+.B EX_CANTCREAT
A (user specified) output file cannot be created.
.TP
-.BR EX_IOERR " (" 74 )
+.B EX_IOERR
An error occurred while doing I/O on some file.
.TP
-.BR EX_TEMPFAIL " (" 75 )
+.B EX_TEMPFAIL
Temporary failure,
indicating something that is not really an error.
For example that a mailer could not create a connection,
and the request should be reattempted later.
.TP
-.BR EX_PROTOCOL " (" 76 )
+.B EX_PROTOCOL
The remote system returned something that
was "not possible" during a protocol exchange.
.TP
-.BR EX_OSFILE " (" 77 )
+.B EX_OSFILE
You did not have sufficient permission to perform the operation.
This is not intended for file system problems,
which should use
@@ -113,7 +175,7 @@ or
.BR EX_CANTCREAT ,
but rather for higher level permissions.
.TP
-.BR EX_CONFIG " (" 78 )
+.B EX_CONFIG
Something was found in an unconfigured or misconfigured state.
.PP
The numerical values corresponding to the symbolical ones