Posix Socket Error Codes
Contents |
DESCRIPTION top The
How To Use Errno
value. errno is defined by the ISO C standard to be a modifiable lvalue of type int, and must not be explicitly declared; errno may be a macro. errno is thread-local; setting it in one thread does not affect its value in any other thread. All the error names specified by POSIX.1 must have distinct values, with the exception of EAGAIN and EWOULDBLOCK, which may be the same. Below is a list of the symbolic error names that are defined on Linux. Some of these are marked POSIX.1, indicating that the name is defined by POSIX.1-2001, or C99, indicating that the name is defined by C99. E2BIG Argument list too long (POSIX.1) EACCES Permission denied (POSIX.1) EADDRINUSE Address already in use (POSIX.1) EADDRNOTAVAIL Address not available (POSIX.1) EAFNOSUPPORT Address family not supported (POSIX.1) EAGAIN Resource temporarily unavailable (may be the same value as EWOULDBLOCK) (POSIX.1) EALREADY Connection already in progress (POSIX.1) EBADE Invalid exchange EBADF Bad file descriptor (POSIX.1) EBADFD File descriptor in bad state EBADMSG Bad message (POSIX.1) EBADR Invalid request descriptor EBADRQC Invalid request code EBADSLT Invalid slot EBUSY Device or resource busy (POSIX.1) ECANCELED Operation canceled (POSIX.1) ECHILD No child processes
Aug 2004 on RedHat 7.3 #define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ #define EINTR 4 /*
Strerror
Interrupted system call */ #define EIO 5 /* I/O error */ #define ENXIO 6 errno c++ /* No such device or address */ #define E2BIG 7 /* Arg list too long */ #define ENOEXEC 8 /* Exec format errno 0 error */ #define EBADF 9 /* Bad file number */ #define ECHILD 10 /* No child processes */ #define EAGAIN 11 /* Try again */ #define ENOMEM 12 /* Out of memory */ #define EACCES 13 /* http://man7.org/linux/man-pages/man3/errno.3.html Permission denied */ #define EFAULT 14 /* Bad address */ #define ENOTBLK 15 /* Block device required */ #define EBUSY 16 /* Device or resource busy */ #define EEXIST 17 /* File exists */ #define EXDEV 18 /* Cross-device link */ #define ENODEV 19 /* No such device */ #define ENOTDIR 20 /* Not a directory */ #define EISDIR 21 /* Is a directory */ #define EINVAL 22 /* Invalid argument */ #define http://www-numi.fnal.gov/offline_software/srt_public_context/WebDocs/Errors/unix_system_errors.html ENFILE 23 /* File table overflow */ #define EMFILE 24 /* Too many open files */ #define ENOTTY 25 /* Not a typewriter */ #define ETXTBSY 26 /* Text file busy */ #define EFBIG 27 /* File too large */ #define ENOSPC 28 /* No space left on device */ #define ESPIPE 29 /* Illegal seek */ #define EROFS 30 /* Read-only file system */ #define EMLINK 31 /* Too many links */ #define EPIPE 32 /* Broken pipe */ #define EDOM 33 /* Math argument out of domain of func */ #define ERANGE 34 /* Math result not representable */ #define EDEADLK 35 /* Resource deadlock would occur */ #define ENAMETOOLONG 36 /* File name too long */ #define ENOLCK 37 /* No record locks available */ #define ENOSYS 38 /* Function not implemented */ #define ENOTEMPTY 39 /* Directory not empty */ #define ELOOP 40 /* Too many symbolic links encountered */ #define EWOULDBLOCK EAGAIN /* Operation would block */ #define ENOMSG 42 /* No message of desired type */ #define EIDRM 43 /* Identifier removed */ #define ECHRNG 44 /* Channel number out of range */ #define EL2NSYNC 45 /* Level 2 not synchronized */ #define EL3HLT 46 /* Level 3 halted */ #define EL3RST 47 /* Level 3 reset */ #define ELNRNG
found (1 meaning all). See also the Popular Errno Codes by Platform http://www.ioplex.com/~miallen/errcmp.html page which displays only errno identifiers that are found on all systems (excluding MS Windows). 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 error codes 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 posix socket error 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