aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Ziaee <concussious@runbox.com>2024-05-04 14:54:21 +0000
committerWarner Losh <imp@FreeBSD.org>2024-05-04 14:56:10 +0000
commit9a62cdc0132720c439313707b5e339dc348b0d45 (patch)
tree22a9e4bec565e4775445d351a7d68c49a220a8b5
parent69ff2d754c1c8bd9c2b6cea28aa754e9f92f9613 (diff)
downloadsrc-9a62cdc0132720c439313707b5e339dc348b0d45.tar.gz
src-9a62cdc0132720c439313707b5e339dc348b0d45.zip
intro.2 as errno.2: Use the name macro for errno
Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1192
-rw-r--r--lib/libsys/intro.213
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/libsys/intro.2 b/lib/libsys/intro.2
index f10312c1962a..008936b278ae 100644
--- a/lib/libsys/intro.2
+++ b/lib/libsys/intro.2
@@ -32,8 +32,9 @@
.Dt INTRO 2
.Os
.Sh NAME
-.Nm intro
-.Nd introduction to system calls and error numbers
+.Nm intro ,
+.Nm errno
+.Nd introduction to system calls and their error numbers
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
@@ -333,7 +334,7 @@ Table of currently available system calls.
.Sh ERRORS
Nearly all of the system calls provide an error number referenced via
the external identifier
-.Va errno .
+.Nm errno .
This identifier is defined in
.In sys/errno.h
as:
@@ -349,7 +350,7 @@ For the initial thread and
non-threaded processes,
.Va __error()
returns a pointer to a global
-.Va errno
+.Nm errno
variable that is compatible with the previous definition.
.Pp
When a system call detects an error,
@@ -357,12 +358,12 @@ it returns an integer value
indicating failure
.Pq usually -1
and sets the variable
-.Va errno
+.Nm errno
accordingly.
This allows interpretation of the failure on receiving
-1 and to take action accordingly.
Successful calls never set
-.Va errno ;
+.Nm errno ;
once set, it remains until another error occurs.
It should only be examined after an error.
Note that a number of system calls overload the meanings of these