The Open Group Base Specifications Issue 7
IEEE Std 1003.1, 2013 Edition
Copyright © 2001-2013 The IEEE and The Open Group


errno.h - system error numbers


#include <errno.h>


[CX] [Option Start] 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-2008 defers to the ISO C standard.

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

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.
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.
Filename too long.
Network is down.
Connection aborted by network.
Network unreachable.
Too many files open in system.
No buffer space available.
[OB XSR] [Option Start] No message is available on the STREAM head read queue. [Option End]
No such device.
No such file or directory.
Executable file format error.
No locks available.
Not enough space.
No message of the desired type.
Protocol not available.
No space left on device.
[OB XSR] [Option Start] No STREAM resources. [Option End]
[OB XSR] [Option Start] Not a STREAM. [Option End]
Function 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.
[OB XSR] [Option Start] Stream ioctl() timeout. [Option End]
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-2008.






XSH Error Numbers


First released in Issue 1. Derived from Issue 1 of the SVID.

Issue 5

Updated for alignment with the POSIX Realtime Extension.

Issue 6

The following new requirements on POSIX implementations derive from alignment with the Single UNIX Specification:

Values for errno are now required to be distinct positive values rather than non-zero values. This change is for alignment with the ISO/IEC 9899:1999 standard.

Issue 7

Austin Group Interpretation 1003.1-2001 #050 is applied, allowing [ENOTSUP] and [EOPNOTSUPP] to be the same values.

The [ENOTRECOVERABLE] and [EOWNERDEAD] errors are added from The Open Group Technical Standard, 2006, Extended API Set Part 2.

Functionality relating to the XSI STREAMS option is marked obsolescent.

Functionality relating to the Threads option is moved to the Base.

This reference page is clarified with respect to macros and symbolic constants.

POSIX.1-2008, Technical Corrigendum 1, XBD/TC1-2008/0043 [324] is applied.

End of informative text.


return to top of page

UNIX ® is a registered Trademark of The Open Group.
POSIX ® is a registered Trademark of The IEEE.
Copyright © 2001-2013 The IEEE and The Open Group, All Rights Reserved
[ Main Index | XBD | XSH | XCU | XRAT ]