errno.h(0P) POSIX Programmer's Manual errno.h(0P)

This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.

errno.h — system error numbers

#include <errno.h>

Some of the functionality described on this reference page extends the ISO C standard. Any conflict between the requirements described here and the ISO C standard is unintentional. This volume of POSIX.1‐2017 defers to the ISO C standard.

The ISO C standard only requires the symbols [EDOM], [EILSEQ], and [ERANGE] to be defined.

The <errno.h> header shall provide a declaration or definition for errno. The symbol errno shall expand to a modifiable lvalue of type int. It is unspecified whether errno is a macro or an identifier declared with external linkage. If a macro definition is suppressed in order to access an actual object, or a program defines an identifier with the name errno, the behavior is undefined.

The <errno.h> header shall define the following macros which shall expand to integer constant expressions with type int, distinct positive values (except as noted below), and which shall be suitable for use in #if preprocessing directives:

Argument list too long.
Permission denied.
Address in use.
Address not available.
Address family not supported.
Resource unavailable, try again (may be the same value as [EWOULDBLOCK]).
Connection already in progress.
Bad file descriptor.
Bad message.
Device or resource busy.
Operation canceled.
No child processes.
Connection aborted.
Connection refused.
Connection reset.
Resource deadlock would occur.
Destination address required.
Mathematics argument out of domain of function.
Reserved.
File exists.
Bad address.
File too large.
Host is unreachable.
Identifier removed.
Illegal byte sequence.
Operation in progress.
Interrupted function.
Invalid argument.
I/O error.
Socket is connected.
Is a directory.
Too many levels of symbolic links.
File descriptor value too large.
Too many links.
Message too large.
Reserved.
Filename too long.
Network is down.
Connection aborted by network.
Network unreachable.
Too many files open in system.
No buffer space available.
No message is available on the STREAM head read queue.
No such device.
No such file or directory.
Executable file format error.
No locks available.
Reserved.
Not enough space.
No message of the desired type.
Protocol not available.
No space left on device.
No STREAM resources.
Not a STREAM.
Functionality not supported.
The socket is not connected.
Not a directory or a symbolic link to a directory.
Directory not empty.

State not recoverable.
Not a socket.
Not supported (may be the same value as [EOPNOTSUPP]).
Inappropriate I/O control operation.
No such device or address.
Operation not supported on socket (may be the same value as [ENOTSUP]).
Value too large to be stored in data type.
Previous owner died.
Operation not permitted.
Broken pipe.
Protocol error.

Protocol not supported.
Protocol wrong type for socket.
Result too large.
Read-only file system.
Invalid seek.
No such process.
Reserved.
Stream ioctl() timeout.
Connection timed out.
Text file busy.
Operation would block (may be the same value as [EAGAIN]).
Cross-device link.

The following sections are informative.

Additional error numbers may be defined on conforming systems; see the System Interfaces volume of POSIX.1‐2017.

None.

None.

The System Interfaces volume of POSIX.1‐2017, Section 2.3, Error Numbers

Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .

Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .

2017 IEEE/The Open Group