POSIX 错误常量


常量 描述
E2BIG 表明参数列表比期望的要长。
EACCES 表明操作没有足够的权限。
EADDRINUSE 表明该网络地址已经在使用。
EADDRNOTAVAIL 表明该网络地址当前不能使用。
EAFNOSUPPORT 表明该网络地址簇不被支持。
EAGAIN 表明当前没有可用数据,稍后再次尝试操作。
EALREADY 表明 socket 有一个即将发生的连接在进行中。
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 表明 socket 已经连接。
EISDIR 表明路径是目录。
ELOOP 表明路径上有太多层次的符号连接。
EMFILE 表明有太多打开的文件。
EMLINK 表明文件上有太多的硬连接。
EMSGSIZE 表明提供的信息太长。
EMULTIHOP 表明多跳被尝试。
ENAMETOOLONG 表明文件名太长。
ENETDOWN 表明网络关闭。
ENETRESET 表明连接被网络终止。
ENETUNREACH 表明网络不可达。
ENFILE 表明系统中打开了太多的文件。
ENOBUFS 表明没有有效的缓存空间。
ENODATA 表明在流头读取队列上没有可用的信息。
ENODEV 表明没有这样的设备。
ENOENT 表明没有这样的文件或目录。
ENOEXEC 表明一个执行格式错误。
ENOLCK 表明没有可用的锁。
ENOLINK 表明链接在服务。
ENOMEM 表明没有足够的空间。
ENOMSG 表明想要的数据类型没有信息。
ENOPROTOOPT 表明给定的协议不可用。
ENOSPC 表明该设备上没有可用的空间。
ENOSR 表明没有可用的流资源。
ENOSTR 表明给定的资源不是流。
ENOSYS 表明功能没有被实现。
ENOTCONN 表明 socket 没有连接。
ENOTDIR 表明路径不是目录。
ENOTEMPTY 表明目录是非空的。
ENOTSOCK 表明给定的项目不是 socket。
ENOTSUP 表明给定的操作不受支持。
ENOTTY 表明一个不适当的 I/O 控制操作。
ENXIO 表明没有该设备或地址。
EOPNOTSUPP 表明一个操作不被 socket 所支持。 尽管 ENOTSUPEOPNOTSUPP 在 Linux 上有相同的值,但是根据 POSIX.1 规范,这些错误值应该不同。
EOVERFLOW 表明一个值太大以至于难以用给定的数据类型存储。
EPERM 表明操作没有被许可。
EPIPE 表明破裂的管道。
EPROTO 表明协议错误。
EPROTONOSUPPORT 表明一个协议不被支持。
EPROTOTYPE 表明 socket 错误的协议类型。
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 currently 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. Note that while 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.