POSIX 错误常量


常量 描述
E2BIG 表示参数列表比预期长。
EACCES 表示操作没有足够的权限。
EADDRINUSE 表示该网络地址已被使用。
EADDRNOTAVAIL 表示该网络地址当前不可用。
EAFNOSUPPORT 表示不支持网络地址族。
EAGAIN 表示没有可用数据,稍后再试操作。
EALREADY 指示套接字已经有正在进行的挂起连接。
EBADF 表示文件描述符无效。
EBADMSG 表示无效的数据消息。
EBUSY 表示设备或资源繁忙。
ECANCELED 表示操作被取消。
ECHILD 表示没有子进程。
ECONNABORTED 表示网络连接已中止。
ECONNREFUSED 表示网络连接已被拒绝。
ECONNRESET 表示网络连接已重置。
EDEADLK 表示避免了资源死锁。
EDESTADDRREQ 表示需要目标地址。
EDOM 表示参数超出了函数的域。
EDQUOT 表示已超出磁盘配额。
EEXIST 表示文件已经存在。
EFAULT 指示无效的指针地址。
EFBIG 表示文件过大。
EHOSTUNREACH 表示主机不可达。
EIDRM 表示该标识符已被删除。
EILSEQ 指示非法字节序列。
EINPROGRESS 表示操作已经在进行中。
EINTR 表示函数调用被中断。
EINVAL 表示提供了无效的参数。
EIO 表示未指定的 I/O 错误。
EISCONN 表示套接字已连接。
EISDIR 表示路径是目录。
ELOOP 表示路径中的符号链接级别过多。
EMFILE 表示打开的文件太多。
EMLINK 表示文件的硬链接过多。
EMSGSIZE 表示提供的消息太长。
EMULTIHOP 表示已尝试多跳。
ENAMETOOLONG 表示文件名太长。
ENETDOWN 表示网络已关闭。
ENETRESET 表示连接已被网络中止。
ENETUNREACH 表示网络不可达。
ENFILE 表示系统中打开的文件过多。
ENOBUFS 表示没有可用的缓冲区空间。
ENODATA 表示流头读取队列上没有可用的消息。
ENODEV 表示没有这样的设备。
ENOENT 表示没有这样的文件或目录。
ENOEXEC 表示 exec 格式错误。
ENOLCK 表示没有可用的锁。
ENOLINK 表示链接已被切断。
ENOMEM 表示空间不足。
ENOMSG 表示没有所需类型的消息。
ENOPROTOOPT 表示给定的协议不可用。
ENOSPC 表示设备上没有可用空间。
ENOSR 表示没有可用的流资源。
ENOSTR 表示给定的资源不是流。
ENOSYS 表示功能尚未实现。
ENOTCONN 表示套接字未连接。
ENOTDIR 表示路径不是目录。
ENOTEMPTY 表示目录不为空。
ENOTSOCK 表示给定的条目不是套接字。
ENOTSUP 表示不支持给定的操作。
ENOTTY 表示不适当的 I/O 控制操作。
ENXIO 表示没有这样的设备或地址。
EOPNOTSUPP 表示套接字不支持某个操作。 尽管 ENOTSUPEOPNOTSUPP 在 Linux 上具有相同的值,但根据 POSIX.1,这些错误值应该是不同的。
EOVERFLOW 表示值太大而无法存储在给定的数据类型中。
EPERM 表示不允许该操作。
EPIPE 表示管道破损。
EPROTO 表示协议错误。
EPROTONOSUPPORT 表示不支持协议。
EPROTOTYPE 标识套接字的错误协议类型。
ERANGE 表示结果过大。
EROFS 表示文件系统是只读的。
ESPIPE 指示无效的查找操作。
ESRCH 表示没有这样的进程。
ESTALE 表示文件句柄已过时。
ETIME 表示过期的定时器。
ETIMEDOUT 表示连接超时。
ETXTBSY 表示文本文件繁忙。
EWOULDBLOCK 表示操作会阻塞。
EXDEV 表示链接不正确。
Constant Description
E2BIG Indicates that the list of arguments is longer than expected.
EACCES Indicates that the operation did not have sufficient permissions.
EADDRINUSE Indicates that the network address is already in use.
EADDRNOTAVAIL Indicates that the network address is currently unavailable for use.
EAFNOSUPPORT Indicates that the network address family is not supported.
EAGAIN Indicates that there is no data available and to try the operation again later.
EALREADY Indicates that the socket already has a pending connection in progress.
EBADF Indicates that a file descriptor is not valid.
EBADMSG Indicates an invalid data message.
EBUSY Indicates that a device or resource is busy.
ECANCELED Indicates that an operation was canceled.
ECHILD Indicates that there are no child processes.
ECONNABORTED Indicates that the network connection has been aborted.
ECONNREFUSED Indicates that the network connection has been refused.
ECONNRESET Indicates that the network connection has been reset.
EDEADLK Indicates that a resource deadlock has been avoided.
EDESTADDRREQ Indicates that a destination address is required.
EDOM Indicates that an argument is out of the domain of the function.
EDQUOT Indicates that the disk quota has been exceeded.
EEXIST Indicates that the file already exists.
EFAULT Indicates an invalid pointer address.
EFBIG Indicates that the file is too large.
EHOSTUNREACH Indicates that the host is unreachable.
EIDRM Indicates that the identifier has been removed.
EILSEQ Indicates an illegal byte sequence.
EINPROGRESS Indicates that an operation is already in progress.
EINTR Indicates that a function call was interrupted.
EINVAL Indicates that an invalid argument was provided.
EIO Indicates an otherwise unspecified I/O error.
EISCONN Indicates that the socket is connected.
EISDIR Indicates that the path is a directory.
ELOOP Indicates too many levels of symbolic links in a path.
EMFILE Indicates that there are too many open files.
EMLINK Indicates that there are too many hard links to a file.
EMSGSIZE Indicates that the provided message is too long.
EMULTIHOP Indicates that a multihop was attempted.
ENAMETOOLONG Indicates that the filename is too long.
ENETDOWN Indicates that the network is down.
ENETRESET Indicates that the connection has been aborted by the network.
ENETUNREACH Indicates that the network is unreachable.
ENFILE Indicates too many open files in the system.
ENOBUFS Indicates that no buffer space is available.
ENODATA Indicates that no message is available on the stream head read queue.
ENODEV Indicates that there is no such device.
ENOENT Indicates that there is no such file or directory.
ENOEXEC Indicates an exec format error.
ENOLCK Indicates that there are no locks available.
ENOLINK Indications that a link has been severed.
ENOMEM Indicates that there is not enough space.
ENOMSG Indicates that there is no message of the desired type.
ENOPROTOOPT Indicates that a given protocol is not available.
ENOSPC Indicates that there is no space available on the device.
ENOSR Indicates that there are no stream resources available.
ENOSTR Indicates that a given resource is not a stream.
ENOSYS Indicates that a function has not been implemented.
ENOTCONN Indicates that the socket is not connected.
ENOTDIR Indicates that the path is not a directory.
ENOTEMPTY Indicates that the directory is not empty.
ENOTSOCK Indicates that the given item is not a socket.
ENOTSUP Indicates that a given operation is not supported.
ENOTTY Indicates an inappropriate I/O control operation.
ENXIO Indicates no such device or address.
EOPNOTSUPP Indicates that an operation is not supported on the socket. Although ENOTSUP and EOPNOTSUPP have the same value on Linux, according to POSIX.1 these error values should be distinct.)
EOVERFLOW Indicates that a value is too large to be stored in a given data type.
EPERM Indicates that the operation is not permitted.
EPIPE Indicates a broken pipe.
EPROTO Indicates a protocol error.
EPROTONOSUPPORT Indicates that a protocol is not supported.
EPROTOTYPE Indicates the wrong type of protocol for a socket.
ERANGE Indicates that the results are too large.
EROFS Indicates that the file system is read only.
ESPIPE Indicates an invalid seek operation.
ESRCH Indicates that there is no such process.
ESTALE Indicates that the file handle is stale.
ETIME Indicates an expired timer.
ETIMEDOUT Indicates that the connection timed out.
ETXTBSY Indicates that a text file is busy.
EWOULDBLOCK Indicates that the operation would block.
EXDEV Indicates an improper link.