posix
POSIX Error Codes
Error codes defined by the POSIX standard, returned via errno. Symbolic names are standardised; numeric values may differ between platforms such as Linux and macOS.
77 codes
· All codes 77 codes
- E2BIG Argument list too long The total size of the argument list and environment variables passed to exec() exceeds the system limit.
- EACCES Permission denied An attempt was made to access a file or resource in a way forbidden by its permissions.
- EADDRINUSE Address already in use The specified network address is already bound to another socket. Numeric value is platform-specific: 98 on Linux, 48 on macOS.
- EADDRNOTAVAIL Address not available The requested address is not available on the local machine. Numeric value is platform-specific: 99 on Linux, 49 on macOS.
- EAFNOSUPPORT Address family not supported The socket address family is not supported by the protocol. Numeric value is platform-specific: 97 on Linux, 47 on macOS.
- EAGAIN Resource temporarily unavailable The operation would block and the descriptor is configured for non-blocking I/O. Retry the operation. Numeric value is platform-specific: 11 on Linux, 35 on macOS.
- EALREADY Connection already in progress A non-blocking connection attempt is already in progress on the socket. Numeric value is platform-specific: 114 on Linux, 37 on macOS.
- EBADF Bad file descriptor A file descriptor argument is out of range, refers to no open file, or a read or write was attempted on a descriptor not open for that operation.
- EBADMSG Bad message A message cannot be represented as a well-formed message of the expected type. Numeric value is platform-specific: 74 on Linux, 94 on macOS.
- EBUSY Device or resource busy The requested resource or device is in use by another process and cannot be accessed at this time.
- ECANCELED Operation cancelled An asynchronous operation was cancelled before it completed. Numeric value is platform-specific: 125 on Linux, 89 on macOS.
- ECHILD No child processes wait() or waitpid() was called when no child processes exist, or the specified process group has no children.
- ECONNABORTED Connection aborted A connection was aborted by the network or the remote peer before it could be established. Numeric value is platform-specific: 103 on Linux, 53 on macOS.
- ECONNREFUSED Connection refused No process is listening on the remote address and port, or the remote host actively refused the connection. Numeric value is platform-specific: 111 on Linux, 61 on macOS.
- ECONNRESET Connection reset A connection was forcibly closed by the remote peer. Numeric value is platform-specific: 104 on Linux, 54 on macOS.
- EDEADLK Resource deadlock avoided Granting a lock request would cause a deadlock between two or more processes. The operation was not performed. Numeric value is platform-specific: 35 on Linux, 11 on macOS.
- EDESTADDRREQ Destination address required A destination address is required but was not provided for a connectionless socket operation. Numeric value is platform-specific: 89 on Linux, 39 on macOS.
- EDOM Mathematics argument out of domain An argument supplied to a mathematical function is outside the defined domain of that function.
- EDQUOT Disk quota exceeded The user's quota of disk blocks or inodes on the file system has been exhausted. Numeric value is platform-specific: 122 on Linux, 69 on macOS.
- EEXIST File exists An attempt was made to create a file that already exists, where exclusive creation was required.
- EFAULT Bad address A pointer argument refers to an address outside the calling process's accessible address space.
- EFBIG File too large An attempt was made to write beyond the maximum allowed size for a file, or to write at an offset beyond the maximum file offset.
- EHOSTUNREACH Host unreachable The remote host cannot be reached from this host via any available network route. Numeric value is platform-specific: 113 on Linux, 65 on macOS.
- EIDRM Identifier removed An IPC identifier (message queue, semaphore set, or shared memory segment) has been removed from the system. Numeric value is platform-specific: 43 on Linux, 90 on macOS.
- EILSEQ Illegal byte sequence A byte sequence does not form a valid character in the current locale encoding. Numeric value is platform-specific: 84 on Linux, 92 on macOS.
- EINPROGRESS Operation in progress A long-running operation (typically a non-blocking connect()) has been initiated and has not yet completed. Numeric value is platform-specific: 115 on Linux, 36 on macOS.
- EINTR Interrupted function call A signal was received while the system call was in progress, causing it to return prematurely. The call may be retried.
- EINVAL Invalid argument An argument supplied to a function call is invalid or out of the permitted range.
- EIO Input/output error A physical I/O error occurred while reading from or writing to a device or file.
- EISCONN Socket is already connected A connect() or bind() operation was attempted on a socket that is already connected. Numeric value is platform-specific: 106 on Linux, 56 on macOS.
- EISDIR Is a directory A file operation (such as open() for writing or unlink()) was attempted on a path that refers to a directory.
- ELOOP Too many levels of symbolic links Resolving a path name encountered too many symbolic links, suggesting a loop. Numeric value is platform-specific: 40 on Linux, 62 on macOS.
- EMFILE Too many open files The per-process limit on open file descriptors has been reached. Close some descriptors before opening more.
- EMLINK Too many links Creating a hard link would exceed the maximum number of hard links permitted for the target file.
- EMSGSIZE Message too long A message sent on a socket exceeds the socket's send buffer size or the protocol's maximum message size. Numeric value is platform-specific: 90 on Linux, 40 on macOS.
- EMULTIHOP Multihop attempted An attempt was made to access a remote resource via multiple hops, which the protocol does not permit. Numeric value is platform-specific: 72 on Linux, 95 on macOS.
- ENAMETOOLONG Filename too long A pathname component exceeds NAME_MAX characters, or an entire pathname exceeds PATH_MAX characters. Numeric value is platform-specific: 36 on Linux, 63 on macOS.
- ENETDOWN Network is down A network operation failed because the local network interface is not operational. Numeric value is platform-specific: 100 on Linux, 50 on macOS.
- ENETRESET Connection aborted by network The network dropped the connection because it detected a keep-alive failure or similar reset condition. Numeric value is platform-specific: 102 on Linux, 52 on macOS.
- ENETUNREACH Network unreachable No route to the destination network is available. Numeric value is platform-specific: 101 on Linux, 51 on macOS.
- ENFILE Too many open files in system The system-wide limit on the total number of open files has been reached.
- ENOBUFS No buffer space available Insufficient kernel buffer space is available to complete the socket operation. Numeric value is platform-specific: 105 on Linux, 55 on macOS.
- ENODEV No such device An operation was attempted on a device that does not exist or does not support the requested function.
- ENOENT No such file or directory A component of the specified path does not exist, or the path is an empty string.
- ENOEXEC Executable file format error An exec() call was attempted on a file that is not in a recognised executable format, or that lacks execute permission.
- ENOLCK No locks available The system has exhausted its table of file locks and cannot satisfy the request. Numeric value is platform-specific: 37 on Linux, 77 on macOS.
- ENOLINK Link has been severed A link to a remote machine is no longer active. Numeric value is platform-specific: 67 on Linux, 97 on macOS.
- ENOMEM Not enough space Insufficient memory is available to satisfy the request. The process or the kernel has run out of virtual memory.
- ENOMSG No message of the desired type No message of the requested type exists on the message queue. Numeric value is platform-specific: 42 on Linux, 91 on macOS.
- ENOPROTOOPT Protocol not available The requested socket option is not available for this protocol or socket type. Numeric value is platform-specific: 92 on Linux, 42 on macOS.
- ENOSPC No space left on device A write operation failed because no space remains on the device containing the file system.
- ENOSYS Function not implemented The function is not implemented on this system or in the current kernel configuration. Numeric value is platform-specific: 38 on Linux, 78 on macOS.
- ENOTCONN Socket is not connected A send, receive, or other operation requiring a connection was attempted on an unconnected socket. Numeric value is platform-specific: 107 on Linux, 57 on macOS.
- ENOTDIR Not a directory A component of the specified path is not a directory, where a directory was expected.
- ENOTEMPTY Directory not empty A directory was supplied to an operation (such as rmdir()) that requires the directory to be empty. Numeric value is platform-specific: 39 on Linux, 66 on macOS.
- ENOTRECOVERABLE State not recoverable A robust mutex is in an unrecoverable state because the previous owner died while holding it and the state was not cleaned up. Numeric value is platform-specific: 131 on Linux, 104 on macOS.
- ENOTSOCK Not a socket A socket operation was attempted on a file descriptor that does not refer to a socket. Numeric value is platform-specific: 88 on Linux, 38 on macOS.
- ENOTSUP Operation not supported The specified operation is not supported on this object or by this implementation. Numeric value is platform-specific: 95 on Linux, 45 on macOS.
- ENOTTY Inappropriate I/O control operation An ioctl() call was made to a file descriptor that does not refer to a terminal, or the terminal does not support the requested operation.
- ENXIO No such device or address An I/O request addressed a device that does not exist, or the address is outside the valid range of the device.
- EOPNOTSUPP Operation not supported on socket The attempted operation is not supported for the type of socket referenced. On many platforms EOPNOTSUPP and ENOTSUP share the same value. Numeric value is platform-specific: 95 on Linux, 102 on macOS.
- EOVERFLOW Value too large to be stored in data type A value is too large to be stored in the result type. Commonly returned when a 32-bit interface is used to access a file whose size or offset exceeds 32 bits. Numeric value is platform-specific: 75 on Linux, 84 on macOS.
- EOWNERDEAD Previous owner died A robust mutex was abandoned by its previous owner. The mutex is now held by the caller, but the protected state may be inconsistent and must be checked. Numeric value is platform-specific: 130 on Linux, 105 on macOS.
- EPERM Operation not permitted The operation is restricted to processes with elevated privileges, or to the owner of the file or resource.
- EPIPE Broken pipe A write was made to a pipe, socket, or FIFO for which no process has the read end open. SIGPIPE is also raised unless blocked or ignored.
- EPROTO Protocol error A protocol-level error has occurred on a socket. Numeric value is platform-specific: 71 on Linux, 100 on macOS.
- EPROTONOSUPPORT Protocol not supported The requested protocol is not supported by the socket type or the system. Numeric value is platform-specific: 93 on Linux, 43 on macOS.
- EPROTOTYPE Protocol wrong type for socket The socket type does not support the requested communications protocol. Numeric value is platform-specific: 91 on Linux, 41 on macOS.
- ERANGE Result too large The result of a function cannot be represented in the available output type, typically because the value exceeds the representable range.
- EROFS Read-only file system A write operation was attempted on a file system that is mounted read-only.
- ESPIPE Invalid seek lseek() was called on a file descriptor referring to a pipe, socket, or FIFO, which do not support seeking.
- ESRCH No such process No process with the specified process ID or process group ID exists.
- ESTALE Stale file handle An NFS file handle is no longer valid, typically because the file was deleted on the server or the server was restarted. Numeric value is platform-specific: 116 on Linux, 70 on macOS.
- ETIMEDOUT Connection timed out A connection or I/O operation did not complete within the allotted time. Numeric value is platform-specific: 110 on Linux, 60 on macOS.
- ETXTBSY Text file busy An attempt was made to execute a file currently open for writing, or to write to a file that is currently being executed.
- EWOULDBLOCK Operation would block The operation would block on a non-blocking descriptor. On most platforms EWOULDBLOCK is an alias for EAGAIN and shares its numeric value: 11 on Linux, 35 on macOS.
- EXDEV Improper link An attempt was made to create a hard link to a file on a different file system, which is not permitted.