Popular Errno Codes by Platform

An identifier is defined for platforms that have a numeric value listed (even though there may not be an associated message shown). Column 2 is a score that indicates the fraction of platforms on which the identifier is found (1 meaning all).

SUSv3 AIX 4.3,5.1 HP-UX 11.22 Solaris 9,10 Linux 2.4.28,2.6.9 IRIX 6.5[4] OSF1 FreeBSD 5.2.1 OSX 10.3.8 MSVC6
EPERM10Operation not permitted.1Operation not permitted1Not super-user1Not super-user1Operation not permitted1Operation not permitted1Not owner1Operation not permitted1Operation not permitted1Operation not permitted
ENOENT10No such file or directory.2No such file or directory2No such file or directory2No such file or directory2No such file or directory2No such file or directory2No such file or directory2No such file or directory2No such file or directory2No such file or directory
ESRCH10No such process.3No such process3No such process3No such process3No such process3No such process3No such process3No such process3No such process3No such process
EINTR10Interrupted function.4interrupted system call4interrupted system call4interrupted system call4Interrupted system call4Interrupted function call4Interrupted system call4Interrupted system call4Interrupted system call4Interrupted function call
EIO10I/O error.5I/O error5I/O error5I/O error5I/O error5I/O error5I/O error5Input/output error5Input/output error5Input/output error
ENXIO10No such device or address.6No such device or address6No such device or address6No such device or address6No such device or address6No such device or address6No such device or address6Device not configured6Device not configured6No such device or address
E2BIG10Argument list too long.7Arg list too long7Arg list too long7Arg list too long7Arg list too long7Arg list too long7Arg list too long7Argument list too long7Argument list too long7Arg list too long
ENOEXEC10Executable file format error.8Exec format error8Exec format error8Exec format error8Exec format error8Exec format error8Exec format error8Exec format error8Exec format error8Exec format error
EBADF10Bad file descriptor.9Bad file descriptor9Bad file number9Bad file number9Bad file number9Bad file number9Bad file number9Bad file descriptor9Bad file descriptor9Bad file descriptor
ECHILD10No child processes.10No child processes10No children10No children10No child processes10No child processes10No children10No child processes10No child processes10No child processes
EAGAIN10Resource unavailable, try again [3]11Resource temporarily unavailable11No more processes11Resource temporarily unavailable11Try again11Resource temporarily unavailable11ditto35Resource temporarily unavailable35Resource temporarily unavailable11Resource temporarily unavailable
ENOMEM10Not enough space.12Not enough space12Not enough core12Not enough core12Out of memory12Not enough space12Not enough core12Cannot allocate memory12Cannot allocate memory12Not enough space
EACCES10Permission denied.13Permission denied13Permission denied13Permission denied13Permission denied13Permission denied13Permission denied13Permission denied13Permission denied13Permission denied
EFAULT10Bad address.14Bad address14Bad address14Bad address14Bad address14Bad address14Bad address14Bad address14Bad address14Bad address
ENOTBLK0.915Block device required15Block device required15Block device required15Block device required15Block device required15Block device required15Block device required15Block device required15Unknown error
EBUSY10Device or resource busy.16Resource busy16Mount device busy16Mount device busy16Device or resource busy16Resource busy16Mount device busy16Device busy16Device busy16Resource device
EEXIST10File exists.17File exists17File exists17File exists17File exists17File exists17File exists17File exists17File exists17File exists
EXDEV10Cross-device link.18Improper link18Cross-device link18Cross-device link18Cross-device link18Improper link18Cross-device link18Cross-device link18Cross-device link18Improper link
ENODEV10No such device.19No such device19No such device19No such device19No such device19No such device19No such device19Operation not supported by device19Operation not supported by device19No such device
ENOTDIR10Not a directory.20Not a directory20Not a directory20Not a directory20Not a directory20Not a directory20Not a directory20Not a directory20Not a directory20Not a directory
EISDIR10Is a directory.21Is a directory21Is a directory21Is a directory21Is a directory21Is a directory21Is a directory21Is a directory21Is a directory21Is a directory
EINVAL10Invalid argument.22Invalid argument22Invalid argument22Invalid argument22Invalid argument22Invalid argument22Invalid argument22Invalid argument22Invalid argument22Invalid argument
ENFILE10Too many files open in system.23Too many open files in system23File table overflow23File table overflow23File table overflow23File table overflow23File table overflow23Too many open files in system23Too many open files in system23Too many open files in system
EMFILE10Too many open files.24Too many open files24Too many open files24Too many open files24Too many open files24Too many open files24Too many open files24Too many open files24Too many open files24Too many open files
ENOTTY10Inappropriate I/O control operation.25Inappropriate I/O control operation25Not a typewriter25Inappropriate ioctl for device25Not a typewriter25Inappropriate I/O control operation25Not a typewriter25Inappropriate ioctl for device25Inappropriate ioctl for device25Inappropriate I/O control operation
ETXTBSY10Text file busy.26Text file busy26Text file busy26Text file busy26Text file busy26Text file busy26Text file busy26Text file busy26Text file busy26Unknown error
EFBIG10File too large.27File too large27File too large27File too large27File too large27File too large27File too large27File too large27File too large27File too large
ENOSPC10No space left on device.28No space left on device28No space left on device28No space left on device28No space left on device28No space left on device28No space left on device28No space left on device28No space left on device28No space left on device
ESPIPE10Invalid seek.29Invalid seek29Illegal seek29Illegal seek29Illegal seek29Illegal seek29Illegal seek29Illegal seek29Illegal seek29Invalid seek
EROFS10Read-only file system.30Read only file system30Read only file system30Read only file system30Read-only file system30Read only file system30Read-only file system30Read-only filesystem30Read-only file system30Read-only file system
EMLINK10Too many links.31Too many links31Too many links31Too many links31Too many links31Too many links31Too many links31Too many links31Too many links31Too many links
EPIPE10Broken pipe.32Broken pipe32Broken pipe32Broken pipe32Broken pipe32Broken pipe32Broken pipe32Broken pipe32Broken pipe32Broken pipe
EDOM0.90Mathematics argument out of domain of function.33Domain error within math function33Math arg out of domain of func33Math argument out of domain of func33Domain error33Argument too large33Numerical argument out of domain33Numerical argument out of domain33Domain error
ERANGE0.90Result too large.34Result too large34Math result not representable34Math result not representable34Result too large34Result too large34Result too large34Result too large34Result too large
ENOMSG0.90No message of the desired type.35No message of desired type35No message of desired type35No message of desired type42No message of desired type35No message of desired type80No msg matches receive request83No message of desired type91No message of desired type
EIDRM0.90Identifier removed.36Identifier removed36Identifier removed36Identifier removed43Identifier removed36Identifier removed81Msg queue id has been removed82Identifier removed90Identifier removed
EDEADLK10Resource deadlock would occur.45Resource deadlock avoided45A deadlock would occur45Deadlock condition.35Resource deadlock would occur45Resource deadlock avoided11Operation would cause deadlock11Resource deadlock avoided [5]11Resource deadlock avoided36Resource deadlock avoided
ENOLCK10No locks available.49No locks available46System record lock table was full46No record locks available.37No record locks available46No locks available77No locks available77No locks available77No locks available39No locks available
ESTALE0.90Reserved.52no filesystem70Stale NFS file handle151Stale NFS file handle116Stale NFS file handle151Stale NFS file handle70Stale NFS file handle70Stale NFS file handle70Stale NFS file handle
EINPROGRESS0.90Operation in progress.55Operation now in progress245Operation now in progress150operation now in progress115Operation now in progress150operation now in progress36Operation now in progress36Operation now in progress36Operation now in progress
EALREADY0.90Connection already in progress.56Operation already in progress244Operation already in progress149operation already in progress114Operation already in progress149operation already in progress37Operation already in progress37Operation already in progress37Operation already in progress
ENOTSOCK0.90Not a socket.57Socket operation on non-socket216Socket operation on non-socket95Socket operation on non-socket88Socket operation on non-socket95Socket operation on non-socket38Socket operation on non-socket38Socket operation on non-socket38Socket operation on non-socket
EDESTADDRREQ0.90Destination address required.58Destination address required217Destination address required96Destination address required89Destination address required96Destination address required39Destination address required39Destination address required39Destination address required
EMSGSIZE0.90Message too large.59Message too long218Message too long97Message too long90Message too long97Inappropriate message buffer length40Message too long40Message too long40Message too long
EPROTOTYPE0.90Protocol wrong type for socket.60Protocol wrong type for socket219Protocol wrong type for socket98Protocol wrong type for socket91Protocol wrong type for socket98Protocol wrong type for socket41Protocol wrong type for socket41Protocol wrong type for socket41Protocol wrong type for socket
ENOPROTOOPT0.90Protocol not available.61Protocol not available220Protocol not available99Protocol not available92Protocol not available99Protocol not available42Protocol not available42Protocol not available42Protocol not available
EPROTONOSUPPORT0.90Protocol not supported.62Protocol not supported221Protocol not supported120Protocol not supported93Protocol not supported120Protocol not supported43Protocol not supported43Protocol not supported43Protocol not supported
EOPNOTSUPP0.90Operation not supported on socket.64Operation not supported on socket223Operation not supported122Operation not supported on socket95Operation not supported on transport endpoint122Operation not supported on socket45Operation not supported on socket45Operation not supported45Operation not supported
EAFNOSUPPORT0.90Address family not supported.66Address family not supported by protocol family225Address family not supported by protocol family124Address family not supported by97Address family not supported by protocol124Address family not supported by47Address family not supported by protocol family47Address family not supported by protocol family47Address family not supported by protocol family
EADDRINUSE0.90Address in use.67Address already in use226Address already in use125Address already in use98Address already in use125Address already in use48Address already in use48Address already in use48Address already in use
EADDRNOTAVAIL0.90Address not available.68Can't assign requested address227Can't assign requested address126Can't assign requested address99Cannot assign requested address126Can't assign requested address49Can't assign requested address49Can't assign requested address49Can't assign requested address
ENETDOWN0.90Network is down.69Network is down228Network is down127Network is down100Network is down127Network is down50Network is down50Network is down50Network is down
ENETUNREACH0.90Network unreachable.70Network is unreachable229Network is unreachable128Network is unreachable101Network is unreachable128Network is unreachable51Network is unreachable51Network is unreachable51Network is unreachable
ENETRESET0.90Connection aborted by network.71Network dropped connection on reset230Network dropped connection on reset129Network dropped connection because102Network dropped connection because of reset129Network dropped connection because52Network dropped connection on reset52Network dropped connection on reset52Network dropped connection on reset
ECONNABORTED0.90Connection aborted.72Software caused connection abort231Software caused connection abort130Software caused connection abort103Software caused connection abort130Software caused connection abort53Software caused connection abort53Software caused connection abort53Software caused connection abort
ECONNRESET0.90Connection reset.73Connection reset by peer232Connection reset by peer131Connection reset by peer104Connection reset by peer131Connection reset by peer54Connection reset by peer54Connection reset by peer54Connection reset by peer
ENOBUFS0.90No buffer space available.74No buffer space available233No buffer space available132No buffer space available105No buffer space available132No buffer space available55No buffer space available55No buffer space available55No buffer space available
EISCONN0.90Socket is connected.75Socket is already connected234Socket is already connected133Socket is already connected106Transport endpoint is already connected133Socket is already connected56Socket is already connected56Socket is already connected56Socket is already connected
ENOTCONN0.90The socket is not connected.76Socket is not connected235Socket is not connected134Socket is not connected107Transport endpoint is not connected134Socket is not connected57Socket is not connected57Socket is not connected57Socket is not connected
ETIMEDOUT0.90Connection timed out.78Connection timed out238Connection timed out145Connection timed out110Connection timed out145Connection timed out60Connection timed out60Operation timed out60Operation timed out
ECONNREFUSED0.90Connection refused.79Connection refused239Connection refused146Connection refused111Connection refused146Connection refused61Connection refused61Connection refused61Connection refused
EHOSTUNREACH0.90Host is unreachable.81No route to host242No route to host148No route to host113No route to host148No route to host65No route to host65No route to host65No route to host
ELOOP0.90Too many levels of symbolic links.85Too many levels of symbolic links249Too many levels of symbolic links90Symbolic link loop40Too many symbolic links encountered90Symbolic link loop62Too many levels of symbolic links62Too many levels of symbolic links62Too many levels of symbolic links
ENAMETOOLONG10Filename too long.86File name too long248File name too long78path name is too long36File name too long78Filename too long63File name too long63File name too long63File name too long38Filename too long
ENOTEMPTY10Directory not empty.87Directory not empty [1]247Directory not empty93directory not empty39Directory not empty93Directory not empty66Directory not empty66Directory not empty66Directory not empty41Directory not empty
ENOSYS10Function not supported.109Function not implemented POSIX251Function not implemented89Unsupported file system operation38Function not implemented89Function not implemented78Function not implemented78Function not implemented78Function not implemented40Function not implemented
EILSEQ10Illegal byte sequence.116Invalid wide character47Illegal byte sequence88Illegal byte sequence.84Illegal byte sequence88Illegal byte sequence.116Invalid wide character86Illegal byte sequence92Illegal byte sequence42Illegal byte sequence
EOVERFLOW0.90Value too large to be stored in data type.127value too large to be stored in data type72Value too large to be stored in data type79value too large to be stored in data type75Value too large for defined data type79value too large to be stored in data type103Value too large to be stored in data type [5]84Value too large to be stored in data type84Value too large to be stored in data type

[1] AIX ENOTEMPTY is 17 "Directory not empty" if _ALL_SOURCE and !_LINUX_SOURCE_COMPAT
[2] AIX EWOULDBLOCK is 11 "Operation would block" if _XOPEN_SOURCE_EXTENDED is 1 meaning SUS UNIX95
[3] SUSv3 states EAGAIN "Resource unavailable, try again" may be the same value as EWOULDBLOCK and indeed many of the platforms listed here have the same value.
[4] IRIX error codes > 256 omitted
[5] FreeBSD EDEADLK 11 "Resource deadlock avoided" used to be EAGAIN
[6] Linux does not have ECANCELED so it is defined to the invlid code 125
[*] HP-UX must define EDOM and ERANGE somewhere as they are ANSI C. I have to investigate why they weren't defined in the main errno header

Michael B Allen <mba2000 ioplex com>
Copyright (c) Sat Feb 26 15:02:33 EST 2005