]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man3/errno.3
fanotify_init.2, fanotify.7: Document FAN_REPORT_TID
[thirdparty/man-pages.git] / man3 / errno.3
index 7eb358bb42791246be290c597f587f5c75ee3b2a..301abd9cdf3948c8a3c550eac71c4de2eab2a1fb 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (c) 1996 Andries Brouwer (aeb@cwi.nl)
 .\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
 .\" This is free documentation; you can redistribute it and/or
 .\" modify it under the terms of the GNU General Public License as
 .\" published by the Free Software Foundation; either version 2 of
 .\" GNU General Public License for more details.
 .\"
 .\" You should have received a copy of the GNU General Public
-.\" License along with this manual; if not, write to the Free
-.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
-.\" USA.
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
 .\"
-.\" 5 Oct 2002, Modified by Michael Kerrisk <mtk-manpages@gmx.net>
+.\" 5 Oct 2002, Modified by Michael Kerrisk <mtk.manpages@gmail.com>
 .\"    Updated for POSIX.1 2001
 .\" 2004-12-17 Martin Schulze <joey@infodrom.org>, mtk
 .\"    Removed errno declaration prototype, added notes
 .\" 2006-02-09 Kurt Wall, mtk
 .\"     Added non-POSIX errors
 .\"
-.TH ERRNO 3 2006-02-09 "" "Linux Programmer's Manual"
+.TH ERRNO 3 2018-02-02 "" "Linux Programmer's Manual"
 .SH NAME
 errno \- number of last error
 .SH SYNOPSIS
 .B #include <errno.h>
-.\".sp
+.\".PP
 .\".BI "extern int " errno ;
 .SH DESCRIPTION
 The
 .I <errno.h>
 header file defines the integer variable
-.BR errno ,
+.IR errno ,
 which is set by system calls and some library functions in the event
 of an error to indicate what went wrong.
-Its value is significant only when the call
-returned an error (usually \-1), and a function that does succeed
-is allowed to change
-.BR errno .
-
-Sometimes, when \-1 is also a valid successful return value
-one has to zero
-.B errno
-before the call in order to detect possible errors.
-
-\fBerrno\fR is defined by the ISO C standard to be a modifiable lvalue
-of type \fIint\fR, and must not be explicitly declared; \fBerrno\fR
+.\"
+.SS errno
+The value in
+.I errno
+is significant only when the return value of
+the call indicated an error
+(i.e., \-1 from most system calls;
+\-1 or NULL from most library functions);
+a function that succeeds
+.I is
+allowed to change
+.IR errno .
+The value of
+.I errno
+is never set to zero by any system call or library function.
+.PP
+For some system calls and library functions (e.g.,
+.BR getpriority (2)),
+\-1 is a valid return on success.
+In such cases, a successful return can be distinguished from an error
+return by setting
+.I errno
+to zero before the call, and then,
+if the call returns a status that indicates that an error
+may have occurred, checking to see if
+.I errno
+has a nonzero value.
+.PP
+.I errno
+is defined by the ISO C standard to be a modifiable lvalue
+of type
+.IR int ,
+and must not be explicitly declared;
+.I errno
 may be a macro.
-\fBerrno\fR is thread-local; setting it in one thread
+.I errno
+is thread-local; setting it in one thread
 does not affect its value in any other thread.
-
-Valid error numbers are all non-zero; \fBerrno\fR is never set to zero
-by any library function.
+.\"
+.SS Error numbers and names
+Valid error numbers are all positive numbers.
+The
+.I <errno.h>
+header file defines symbolic names for each
+of the possible error numbers that may appear in
+.IR errno .
+.PP
 All the error names specified by POSIX.1
 must have distinct values, with the exception of
 .B EAGAIN
 and
 .BR EWOULDBLOCK ,
 which may be the same.
-
-.\" The following is now
+.PP
+The error numbers that correspond to each symbolic name
+vary across UNIX systems,
+and even across different architectures on Linux.
+Therefore, numeric values are not included as part of the list of
+error names below.
+The
+.BR perror (3)
+and
+.BR strerror (3)
+functions can be used to convert these names to
+corresponding textual error messages.
+.PP
+On any particular Linux system,
+one can obtain a list of all symbolic error names and
+the corresponding error numbers using the
+.BR errno (1)
+command (part of the
+.I moreutils
+package):
+.PP
+.in +4n
+.EX
+$ \fBerrno \-l\fP
+EPERM 1 Operation not permitted
+ENOENT 2 No such file or directory
+ESRCH 3 No such process
+EINTR 4 Interrupted system call
+EIO 5 Input/output error
+\&...
+.EE
+.in
+.PP
+The
+.BR errno (1)
+command can also be used to look up individual error numbers and names,
+and to search for errors using strings from the error description,
+as in the following examples:
+.PP
+.in +4n
+.EX
+$ \fBerrno 2\fP
+ENOENT 2 No such file or directory
+$ \fBerrno ESRCH\fP
+ESRCH 3 No such process
+$ \fBerrno \-s permission\fP
+EACCES 13 Permission denied
+.EE
+.in
+.PP
 .\" POSIX.1 (2001 edition) lists the following symbolic error names.  Of
-.\" these, \fBEDOM\fR and \fBERANGE\fR are in the ISO C standard.  ISO C
-.\" Amendment 1 defines the additional error number \fBEILSEQ\fR for
+.\" these, \fBEDOM\fP and \fBERANGE\fP are in the ISO C standard.  ISO C
+.\" Amendment 1 defines the additional error number \fBEILSEQ\fP for
 .\" coding errors in multibyte or wide characters.
 .\"
-Below is a list of the symbolic error names that are defined on Linux.
-Some of these are marked
-.IR POSIX.1 ,
-indicating that the name is defined by POSIX.1-2001, or
-.IR C99 ,
-indicating that the name is defined by C99.
-.TP
-.BR E2BIG
-Argument list too long (POSIX.1)
-.TP
-.BR EACCES
-Permission denied (POSIX.1)
-.TP
-.BR EADDRINUSE
-Address already in use (POSIX.1)
-.TP
-.BR EADDRNOTAVAIL
-Address not available (POSIX.1)
+.SS List of error names
+In the list of the symbolic error names below,
+various names are marked as follows:
+.IP * 3
+.IR POSIX.1-2001 :
+The name is defined by POSIX.1-2001,
+and is defined in later POSIX.1 versions, unless otherwise indicated.
+.IP *
+.IR POSIX.1-2008 :
+The name is defined in POSIX.1-2008,
+but was not present in earlier POSIX.1 standards.
+.IP *
+.IR C99 :
+The name is defined by C99.
+Below is a list of the symbolic error names that are defined on Linux:
+.TP 16
+.B E2BIG
+Argument list too long (POSIX.1-2001).
+.TP
+.B EACCES
+Permission denied (POSIX.1-2001).
+.TP
+.B EADDRINUSE
+Address already in use (POSIX.1-2001).
+.TP
+.B EADDRNOTAVAIL
+Address not available (POSIX.1-2001).
 .\" EADV is only an error on HURD(?)
 .TP
-.BR EAFNOSUPPORT
-Address family not supported (POSIX.1)
+.B EAFNOSUPPORT
+Address family not supported (POSIX.1-2001).
 .TP
-.BR EAGAIN
+.B EAGAIN
 Resource temporarily unavailable (may be the same value as
 .BR EWOULDBLOCK )
-(POSIX.1)
+(POSIX.1-2001).
 .TP
-.BR EALREADY
-Connection already in progress (POSIX.1)
+.B EALREADY
+Connection already in progress (POSIX.1-2001).
 .TP
-.BR EBADE
-Invalid exchange
+.B EBADE
+Invalid exchange.
 .TP
-.BR EBADF
-Bad file descriptor (POSIX.1)
+.B EBADF
+Bad file descriptor (POSIX.1-2001).
 .TP
-.BR EBADFD
-File descriptor in bad state
+.B EBADFD
+File descriptor in bad state.
 .TP
-.BR EBADMSG
-Bad message (POSIX.1)
+.B EBADMSG
+Bad message (POSIX.1-2001).
 .TP
-.BR EBADR
-Invalid request descriptor
+.B EBADR
+Invalid request descriptor.
 .TP
-.BR EBADRQC
-Invalid request code
+.B EBADRQC
+Invalid request code.
 .TP
-.BR EBADSLT
-Invalid slot
+.B EBADSLT
+Invalid slot.
 .\" EBFONT is defined but appears not to be used by kernel or glibc.
 .TP
-.BR EBUSY
-Device or resource busy (POSIX.1)
+.B EBUSY
+Device or resource busy (POSIX.1-2001).
 .TP
-.BR ECANCELED
-Operation canceled (POSIX.1)
+.B ECANCELED
+Operation canceled (POSIX.1-2001).
 .TP
-.BR ECHILD
-No child processes (POSIX.1)
+.B ECHILD
+No child processes (POSIX.1-2001).
 .TP
 .B ECHRNG
-Channel number out of range
+Channel number out of range.
 .TP
 .B ECOMM
-Communication error on send
+Communication error on send.
 .TP
-.BR ECONNABORTED
-Connection aborted (POSIX.1)
+.B ECONNABORTED
+Connection aborted (POSIX.1-2001).
 .TP
-.BR ECONNREFUSED
-Connection refused (POSIX.1)
+.B ECONNREFUSED
+Connection refused (POSIX.1-2001).
 .TP
-.BR ECONNRESET
-Connection reset (POSIX.1)
+.B ECONNRESET
+Connection reset (POSIX.1-2001).
 .TP
-.BR EDEADLK
-Resource deadlock avoided (POSIX.1)
+.B EDEADLK
+Resource deadlock avoided (POSIX.1-2001).
 .TP
-.BR EDEADLOCK
+.B EDEADLOCK
 Synonym for
-.B EDEADLK
+.BR EDEADLK .
 .TP
-.BR EDESTADDRREQ
-Destination address required (POSIX.1)
+.B EDESTADDRREQ
+Destination address required (POSIX.1-2001).
 .TP
-.BR EDOM
-Mathematics argument out of domain of function (POSIX.1, C99)
+.B EDOM
+Mathematics argument out of domain of function (POSIX.1, C99).
 .\" EDOTDOT is defined but appears to be unused
 .TP
-.BR EDQUOT
+.B EDQUOT
 .\" POSIX just says "Reserved"
-Disk quota exceeded (POSIX.1)
+Disk quota exceeded (POSIX.1-2001).
 .TP
-.BR EEXIST
-File exists (POSIX.1)
+.B EEXIST
+File exists (POSIX.1-2001).
 .TP
-.BR EFAULT
-Bad address (POSIX.1)
+.B EFAULT
+Bad address (POSIX.1-2001).
 .TP
-.BR EFBIG
-File too large (POSIX.1)
+.B EFBIG
+File too large (POSIX.1-2001).
 .TP
-.BR EHOSTDOWN
-Host is down
+.B EHOSTDOWN
+Host is down.
 .TP
-.BR EHOSTUNREACH
-Host is unreachable (POSIX.1)
+.B EHOSTUNREACH
+Host is unreachable (POSIX.1-2001).
 .TP
-.BR EIDRM
-Identifier removed (POSIX.1)
+.B EHWPOISON
+Memory page has hardware error.
 .TP
-.BR EILSEQ
-Illegal byte sequence (POSIX.1, C99)
+.B EIDRM
+Identifier removed (POSIX.1-2001).
 .TP
-.BR EINPROGRESS
-Operation in progress (POSIX.1)
+.B EILSEQ
+Invalid or incomplete multibyte or wide character (POSIX.1, C99).
+.IP
+The text shown here is the glibc error description;
+in POSIX.1, this error is described as "Illegal byte sequence".
 .TP
-.BR EINTR
-Interrupted function call (POSIX.1)
+.B EINPROGRESS
+Operation in progress (POSIX.1-2001).
 .TP
-.BR EINVAL
-Invalid argument (POSIX.1)
+.B EINTR
+Interrupted function call (POSIX.1-2001); see
+.BR signal (7).
 .TP
-.BR EIO
-Input/output error (POSIX.1)
+.B EINVAL
+Invalid argument (POSIX.1-2001).
 .TP
-.BR EISCONN
-Socket is connected (POSIX.1)
+.B EIO
+Input/output error (POSIX.1-2001).
 .TP
-.BR EISDIR
-Is a directory (POSIX.1)
+.B EISCONN
+Socket is connected (POSIX.1-2001).
 .TP
-.BR EISNAM
-Is a named type file
+.B EISDIR
+Is a directory (POSIX.1-2001).
 .TP
-.BR EKEYEXPIRED
-Key has expired
+.B EISNAM
+Is a named type file.
 .TP
-.BR EKEYREJECTED
-Key was rejected by service
+.B EKEYEXPIRED
+Key has expired.
 .TP
-.BR EKEYREVOKED
-Key has been revoked
+.B EKEYREJECTED
+Key was rejected by service.
+.TP
+.B EKEYREVOKED
+Key has been revoked.
 .TP
 .B EL2HLT
-Level 2 halted
+Level 2 halted.
 .TP
 .B EL2NSYNC
-Level 2 not synchronized
+Level 2 not synchronized.
 .TP
 .B EL3HLT
-Level 3 halted
+Level 3 halted.
 .TP
 .B EL3RST
-Level 3 halted
+Level 3 reset.
+.TP
+.B ELIBACC
+Cannot access a needed shared library.
 .TP
-.BR ELIBACC
-Cannot access a needed shared library
+.B ELIBBAD
+Accessing a corrupted shared library.
 .TP
-.BR ELIBBAD
-Accessing a corrupted shared library
+.B ELIBMAX
+Attempting to link in too many shared libraries.
 .TP
-.BR ELIBMAX
-Attempting to link in too many shared libraries
+.B ELIBSCN
+\&.lib section in a.out corrupted
 .TP
-.BR ELIBSCN
-lib section in a.out corrupted
+.B ELIBEXEC
+Cannot exec a shared library directly.
 .TP
-.BR ELIBEXEC
-Cannot exec a shared library directly
+.B ELNRANGE
+.\" ELNRNG appears to be used by a few drivers
+Link number out of range.
 .TP
-.BR ELOOP
-Too many levels of symbolic links (POSIX.1)
-.\" ELNRNG is defined but appears to be unused
+.B ELOOP
+Too many levels of symbolic links (POSIX.1-2001).
 .TP
-.BR EMEDIUMTYPE
-Wrong medium type
+.B EMEDIUMTYPE
+Wrong medium type.
 .TP
-.BR EMFILE
-Too many open files (POSIX.1)
+.B EMFILE
+Too many open files (POSIX.1-2001).
+Commonly caused by exceeding the
+.BR RLIMIT_NOFILE
+resource limit described in
+.BR getrlimit (2).
 .TP
-.BR EMLINK
-Too many links (POSIX.1)
+.B EMLINK
+Too many links (POSIX.1-2001).
 .TP
-.BR EMSGSIZE
-Message too long (POSIX.1)
+.B EMSGSIZE
+Message too long (POSIX.1-2001).
 .TP
-.BR EMULTIHOP
+.B EMULTIHOP
 .\" POSIX says "Reserved"
-Multihop attempted (POSIX.1)
+Multihop attempted (POSIX.1-2001).
 .TP
-.BR ENAMETOOLONG
-Filename too long (POSIX.1)
+.B ENAMETOOLONG
+Filename too long (POSIX.1-2001).
 .\" ENAVAIL is defined, but appears not to be used
 .TP
-.BR ENETDOWN
-Network is down (POSIX.1)
+.B ENETDOWN
+Network is down (POSIX.1-2001).
 .TP
-.BR ENETRESET
-Connection aborted by network (POSIX.1)
+.B ENETRESET
+Connection aborted by network (POSIX.1-2001).
 .TP
-.BR ENETUNREACH
-Network unreachable (POSIX.1)
+.B ENETUNREACH
+Network unreachable (POSIX.1-2001).
 .TP
-.BR ENFILE
-Too many open files in system (POSIX.1)
-.\" ENOANO is defined but appears to be unused.
+.B ENFILE
+Too many open files in system (POSIX.1-2001).
+On Linux, this is probably a result of encountering the
+.IR /proc/sys/fs/file-max
+limit (see
+.BR proc (5)).
 .TP
-.BR ENOBUFS
-No buffer space available (POSIX.1 (XSI STREAMS option))
+.B ENOANO
+.\" ENOANO appears to be used by a few drivers
+No anode.
+.TP
+.B ENOBUFS
+No buffer space available (POSIX.1 (XSI STREAMS option)).
 .\" ENOCSI is defined but appears to be unused.
 .TP
-.BR ENODATA
-No message is available on the STREAM head read queue (POSIX.1)
+.B ENODATA
+No message is available on the STREAM head read queue (POSIX.1-2001).
 .TP
-.BR ENODEV
-No such device (POSIX.1)
+.B ENODEV
+No such device (POSIX.1-2001).
 .TP
-.BR ENOENT
-No such file or directory (POSIX.1)
+.B ENOENT
+No such file or directory (POSIX.1-2001).
+.IP
+Typically, this error results when a specified pathname does not exist,
+or one of the components in the directory prefix of a pathname does not exist,
+or the specified pathname is a dangling symbolic link.
 .TP
-.BR ENOEXEC
-Exec format error (POSIX.1)
+.B ENOEXEC
+Exec format error (POSIX.1-2001).
 .TP
-.BR ENOKEY
-Required key not available
+.B ENOKEY
+Required key not available.
 .TP
-.BR ENOLCK
-No locks available (POSIX.1)
+.B ENOLCK
+No locks available (POSIX.1-2001).
 .TP
-.BR ENOLINK
+.B ENOLINK
 .\" POSIX says "Reserved"
-Link has been severed (POSIX.1)
+Link has been severed (POSIX.1-2001).
 .TP
-.BR ENOMEDIUM
-No medium found
+.B ENOMEDIUM
+No medium found.
 .TP
-.BR ENOMEM
-Not enough space (POSIX.1)
+.B ENOMEM
+Not enough space/cannot allocate memory (POSIX.1-2001).
 .TP
-.BR ENOMSG
-No message of the desired type (POSIX.1)
+.B ENOMSG
+No message of the desired type (POSIX.1-2001).
 .TP
-.BR ENONET
-Machine is not on the network
+.B ENONET
+Machine is not on the network.
 .TP
-.BR ENOPKG
-Package not installed
+.B ENOPKG
+Package not installed.
 .TP
-.BR ENOPROTOOPT
-Protocol not available (POSIX.1)
+.B ENOPROTOOPT
+Protocol not available (POSIX.1-2001).
 .TP
-.BR ENOSPC
-No space left on device (POSIX.1)
+.B ENOSPC
+No space left on device (POSIX.1-2001).
 .TP
-.BR ENOSR
-No STREAM resources (POSIX.1 (XSI STREAMS option))
+.B ENOSR
+No STREAM resources (POSIX.1 (XSI STREAMS option)).
 .TP
-.BR ENOSTR
-Not a STREAM (POSIX.1 (XSI STREAMS option))
+.B ENOSTR
+Not a STREAM (POSIX.1 (XSI STREAMS option)).
 .TP
-.BR ENOSYS
-Function not implemented (POSIX.1)
+.B ENOSYS
+Function not implemented (POSIX.1-2001).
 .TP
-.BR ENOTBLK
-Block device required
+.B ENOTBLK
+Block device required.
 .TP
-.BR ENOTCONN
-The socket is not connected (POSIX.1)
+.B ENOTCONN
+The socket is not connected (POSIX.1-2001).
 .TP
-.BR ENOTDIR
-Not a directory (POSIX.1)
+.B ENOTDIR
+Not a directory (POSIX.1-2001).
 .TP
-.BR ENOTEMPTY
-Directory not empty (POSIX.1)
+.B ENOTEMPTY
+Directory not empty (POSIX.1-2001).
 .\" ENOTNAM is defined but appears to be unused.
 .TP
-.BR ENOTSOCK
-Not a socket (POSIX.1)
+.B ENOTRECOVERABLE
+State not recoverable (POSIX.1-2008).
+.TP
+.B ENOTSOCK
+Not a socket (POSIX.1-2001).
 .TP
-.BR ENOTSUP
-Operation not supported (POSIX.1)
+.B ENOTSUP
+Operation not supported (POSIX.1-2001).
 .TP
-.BR ENOTTY
-Inappropriate I/O control operation (POSIX.1)
+.B ENOTTY
+Inappropriate I/O control operation (POSIX.1-2001).
 .TP
-.BR ENOTUNIQ
-Name not unique on network
+.B ENOTUNIQ
+Name not unique on network.
 .TP
-.BR ENXIO
-No such device or address (POSIX.1)
+.B ENXIO
+No such device or address (POSIX.1-2001).
 .TP
-.BR EOPNOTSUPP
-Operation not supported on socket (POSIX.1)
-.sp
-(ENOTSUP and EOPNOTSUPP have the same value on Linux, but
+.B EOPNOTSUPP
+Operation not supported on socket (POSIX.1-2001).
+.IP
+.RB ( ENOTSUP
+and
+.B EOPNOTSUPP
+have the same value on Linux, but
 according to POSIX.1 these error values should be distinct.)
 .TP
-.BR EOVERFLOW
-Value too large to be stored in data type (POSIX.1)
+.B EOVERFLOW
+Value too large to be stored in data type (POSIX.1-2001).
 .TP
-.BR EPERM
-Operation not permitted (POSIX.1)
+.B EOWNERDEAD
+.\" Used at least by the user-space side of rubost mutexes
+Owner died (POSIX.1-2008).
 .TP
-.BR EPFNOSUPPORT
-Protocol family not supported
+.B EPERM
+Operation not permitted (POSIX.1-2001).
 .TP
-.BR EPIPE
-Broken pipe (POSIX.1)
+.B EPFNOSUPPORT
+Protocol family not supported.
 .TP
-.BR EPROTO
-Protocol error (POSIX.1)
+.B EPIPE
+Broken pipe (POSIX.1-2001).
 .TP
-.BR EPROTONOSUPPORT
-Protocol not supported (POSIX.1)
+.B EPROTO
+Protocol error (POSIX.1-2001).
 .TP
-.BR EPROTOTYPE
-Protocol wrong type for socket (POSIX.1)
+.B EPROTONOSUPPORT
+Protocol not supported (POSIX.1-2001).
 .TP
-.BR ERANGE
-Result too large (POSIX.1, C99)
+.B EPROTOTYPE
+Protocol wrong type for socket (POSIX.1-2001).
 .TP
-.BR EREMCHG
-Remote address changed
+.B ERANGE
+Result too large (POSIX.1, C99).
 .TP
-.BR EREMOTE
-Object is remote
+.B EREMCHG
+Remote address changed.
 .TP
-.BR EREMOTEIO
-Remote I/O error
+.B EREMOTE
+Object is remote.
 .TP
-.BR ERESTART
-Interrupted system call should be restarted
+.B EREMOTEIO
+Remote I/O error.
 .TP
-.BR EROFS
-Read-only file system (POSIX.1)
+.B ERESTART
+Interrupted system call should be restarted.
 .TP
-.BR ESHUTDOWN
-Cannot send after transport endpoint shutdown
+.B ERFKILL
+.\" ERFKILL appears to be used by various drivers
+Operation not possible due to RF-kill.
 .TP
-.BR ESPIPE
-Invalid seek (POSIX.1)
+.B EROFS
+Read-only filesystem (POSIX.1-2001).
 .TP
-.BR ESOCKTNOSUPPORT
-Socket type not supported
+.B ESHUTDOWN
+Cannot send after transport endpoint shutdown.
 .TP
-.BR ESRCH
-No such process (POSIX.1)
+.B ESPIPE
+Invalid seek (POSIX.1-2001).
+.TP
+.B ESOCKTNOSUPPORT
+Socket type not supported.
+.TP
+.B ESRCH
+No such process (POSIX.1-2001).
 .\" ESRMNT is defined but appears not to be used
 .TP
-.BR ESTALE
-Stale file handle (POSIX.1)
-.sp
-This error can occur for NFS and for other file systems
+.B ESTALE
+Stale file handle (POSIX.1-2001).
+.IP
+This error can occur for NFS and for other filesystems.
 .TP
-.BR ESTRPIPE
-Streams pipe error
+.B ESTRPIPE
+Streams pipe error.
 .TP
-.BR ETIME
+.B ETIME
 Timer expired
-(POSIX.1 (XSI STREAMS option))
-.sp
+(POSIX.1 (XSI STREAMS option)).
+.IP
 (POSIX.1 says "STREAM
 .BR ioctl (2)
-timeout")
+timeout".)
+.TP
+.B ETIMEDOUT
+Connection timed out (POSIX.1-2001).
 .TP
-.BR ETIMEDOUT
-Connection timed out (POSIX.1)
-.\" ETOOMANYREFS is defined, but appears not to be used.
+.B ETOOMANYREFS
+.\" ETOOMANYREFS seems to be used in net/unix/af_unix.c
+Too many references: cannot splice.
 .TP
-.BR ETXTBSY
-Text file busy (POSIX.1)
+.B ETXTBSY
+Text file busy (POSIX.1-2001).
 .TP
-.BR EUCLEAN
-Structure needs cleaning
+.B EUCLEAN
+Structure needs cleaning.
 .TP
-.BR EUNATCH
-Protocol driver not attached
+.B EUNATCH
+Protocol driver not attached.
 .TP
-.BR EUSERS
-Too many users
+.B EUSERS
+Too many users.
 .TP
-.BR EWOULDBLOCK
+.B EWOULDBLOCK
 Operation would block (may be same value as
 .BR EAGAIN )
-(POSIX.1)
+(POSIX.1-2001).
 .TP
-.BR EXDEV
-Improper link (POSIX.1)
+.B EXDEV
+Improper link (POSIX.1-2001).
 .TP
 .B EXFULL
-Exchange full
+Exchange full.
 .SH NOTES
 A common mistake is to do
-.RS
-.nf
-
+.PP
+.in +4n
+.EX
 if (somecall() == \-1) {
     printf("somecall() failed\en");
     if (errno == ...) { ... }
 }
-
-.fi
-.RE
+.EE
+.in
+.PP
 where
 .I errno
 no longer needs to have the value it had upon return from
@@ -487,30 +616,31 @@ no longer needs to have the value it had upon return from
 If the value of
 .I errno
 should be preserved across a library call, it must be saved:
-.RS
-.nf
-
+.PP
+.in +4n
+.EX
 if (somecall() == \-1) {
     int errsv = errno;
     printf("somecall() failed\en");
     if (errsv == ...) { ... }
 }
-.fi
-.RE
+.EE
+.in
 .PP
-It was common in traditional C to declare
+On some ancient systems,
+.I <errno.h>
+was not present or did not declare
+.IR errno ,
+so that it was necessary to declare
 .I errno
 manually
 (i.e.,
-.IR "extern int errno" )
-instead of including
-.IR <errno.h> .
+.IR "extern int errno" ).
 .BR "Do not do this" .
-It will not work with modern versions of the C library.
-However, on (very) old Unix systems, there may be no
-.I <errno.h>
-and the declaration is needed.
-.SH "SEE ALSO"
+It long ago ceased to be necessary,
+and it will cause problems with modern versions of the C library.
+.SH SEE ALSO
+.BR errno (1),  \" In the moreutils package
 .BR err (3),
 .BR error (3),
 .BR perror (3),