The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9a62cdc0132720c439313707b5e339dc348b0d45
commit 9a62cdc0132720c439313707b5e339dc348b0d45 Author: Alexander Ziaee <concussi...@runbox.com> AuthorDate: 2024-05-04 14:54:21 +0000 Commit: Warner Losh <i...@freebsd.org> CommitDate: 2024-05-04 14:56:10 +0000 intro.2 as errno.2: Use the name macro for errno Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1192 --- lib/libsys/intro.2 | 13 +++++++------ 1 file 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