Linux Error Codes Eacces
Contents |
DESCRIPTION top The
Linux Errno To String
an error may have occurred, checking to see if errno has a nonzero 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 (POS
codes can’t occur on GNU systems, but they can occur using the GNU C Library on other systems. Macro: int EPERM Operation not permitted; only
Errno.h In C
the owner of the file (or other resource) or processes with special errno.h windows privileges can perform the operation. Macro: int ENOENT No such file or directory. This is a “file doesn’t exist” efault error for ordinary files that are referenced in contexts where they are expected to already exist. Macro: int ESRCH No process matches the specified process ID. Macro: int EINTR Interrupted function http://man7.org/linux/man-pages/man3/errno.3.html call; an asynchronous signal occurred and prevented completion of the call. When this happens, you should try the call again. You can choose to have functions resume after a signal that is handled, rather than failing with EINTR; see Interrupted Primitives. Macro: int EIO Input/output error; usually used for physical read or write errors. Macro: int ENXIO No such device or address. http://www.gnu.org/s/libc/manual/html_node/Error-Codes.html The system tried to use the device represented by a file you specified, and it couldn’t find the device. This can mean that the device file was installed incorrectly, or that the physical device is missing or not correctly attached to the computer. Macro: int E2BIG Argument list too long; used when the arguments passed to a new program being executed with one of the exec functions (see Executing a File) occupy too much memory space. This condition never arises on GNU/Hurd systems. Macro: int ENOEXEC Invalid executable file format. This condition is detected by the exec functions; see Executing a File. Macro: int EBADF Bad file descriptor; for example, I/O on a descriptor that has been closed or reading from a descriptor open only for writing (or vice versa). Macro: int ECHILD There are no child processes. This error happens on operations that are supposed to manipulate child processes, when there aren’t any processes to manipulate. Macro: int EDEADLK Deadlock avoided; allocating a system resource would have resulted in a deadlock situation. The system does not guarantee that it will notice all suc
6 #define ESRCH 3 /* No such process */ 7 #define EINTR 4 /* Interrupted system call */ 8 #define EIO 5 /* I/O error */ 9 #define ENXIO 6 /* No such device or address */ 10 #define E2BIG http://kernelhistory.sourcentral.org/linux-0.99.3/S/32.html 7 /* Arg list too long */ 11 #define ENOEXEC 8 /* Exec format error http://www.qnx.com/developers/docs/660/topic/com.qnx.doc.neutrino.lib_ref/topic/e/errno.html */ 12 #define EBADF 9 /* Bad file number */ 13 #define ECHILD 10 /* No child processes */ 14 #define EAGAIN 11 /* Try again */ 15 #define ENOMEM 12 /* Out of memory */ 16 #define EACCES 13 /* Permission denied */ 17 #define EFAULT 14 /* Bad address */ 18 #define ENOTBLK 15 /* Block error codes device required */ 19 #define EBUSY 16 /* Device or resource busy */ 20 #define EEXIST 17 /* File exists */ 21 #define EXDEV 18 /* Cross-device link */ 22 #define ENODEV 19 /* No such device */ 23 #define ENOTDIR 20 /* Not a directory */ 24 #define EISDIR 21 /* Is a directory */ 25 #define EINVAL 22 /* Invalid argument */ 26 #define ENFILE 23 /* File table overflow linux error codes */ 27 #define EMFILE 24 /* Too many open files */ 28 #define ENOTTY 25 /* Not a typewriter */ 29 #define ETXTBSY 26 /* Text file busy */ 30 #define EFBIG 27 /* File too large */ 31 #define ENOSPC 28 /* No space left on device */ 32 #define ESPIPE 29 /* Illegal seek */ 33 #define EROFS 30 /* Read-only file system */ 34 #define EMLINK 31 /* Too many links */ 35 #define EPIPE 32 /* Broken pipe */ 36 #define EDOM 33 /* Math argument out of domain of func */ 37 #define ERANGE 34 /* Math result not representable */ 38 #define EDEADLK 35 /* Resource deadlock would occur */ 39 #define ENAMETOOLONG 36 /* File name too long */ 40 #define ENOLCK 37 /* No record locks available */ 41 #define ENOSYS 38 /* Function not implemented */ 42 #define ENOTEMPTY 39 /* Directory not empty */ 43 #define ELOOP 40 /* Too many symbolic links encountered */ 44 #define EWOULDBLOCK EAGAIN /* Operation would block */ 45 #define ENOMSG 42 /* No message of desired type */ 46 #define EIDRM 43 /* Identifier removed */ 47 #define ECHRNG 44 /* Channel number out of range */ 48 #define EL2NSYNC 45 /* Level 2 not synchronized */ 49 #d
-l c option to qcc to link against this library. This library is usually included automatically. Description: The errno variable is set to certain error values by many functions whenever an error has occurred. This variable may be implemented as a macro, but you can always examine or set it as if it were a simple integer variable. Note: You can't assume that the value of errno is valid unless the function that you've called indicates that an error has occurred. The runtime library never resets errno to 0. The documentation for a function might list special meanings for certain values of errno, but this doesn't mean that these are necessarily the only values that the function might set. Each thread in a multi-threaded program has its own error value in its thread local storage. No matter which thread you're in, you can simply refer to errno — it's defined in such a way that it refers to the correct variable for the thread. For more information, see "Local storage for private data" in the documentation for ThreadCreate(). The following variables are also defined in