Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Errno.h
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== POSIX errors == The [[Glibc|GNU C library]] (GLIBC) provides the additional [[POSIX]] error values macros in the header file {{Code|errno.h}}.<ref>{{Cite web |title=Error Codes (The GNU C Library) |url=https://www.gnu.org/software/libc/manual/html_node/Error-Codes.html |date=Mar 29, 2025| access-date=Apr 5, 2025 |website=www.gnu.org}}</ref> These are the descriptions of the macros provided by [[strerror]]. {| class="wikitable sortable" |- ! Symbol !! Value<ref>{{cite web |author=<!-- not stated --> |title=Debugging: POSIX errors |url=https://docs.particle.io/reference/device-os/api/debugging/posix-errors/ |website=particle.io |access-date=Apr 5, 2025 }}</ref> !! Description |- | {{tt|EPERM}} || 1 || Operation not permitted |- | {{tt|ENOENT}} || 2 || No such file or directory |- | {{tt|ESRCH}} || 3 || No such process |- | {{tt|EINTR}} || 4 || Interrupted system call |- | {{tt|EIO}} || 5 || Input/output error |- | {{tt|ENXIO}} || 6 || No such device or address |- | {{tt|E2BIG}} || 7 || Argument list too long |- | {{tt|ENOEXEC}} || 8 || Exec format error |- | {{tt|EBADF}} || 9 || Bad file descriptor |- | {{tt|ECHILD}} || 10 || No child processes |- | {{tt|EAGAIN}} || 11 || Resource temporarily unavailable |- | {{tt|ENOMEM}} || 12 || Cannot allocate memory |- | {{tt|EACCES}} || 13 || Permission denied |- | {{tt|EFAULT}} || 14 || Bad address |- | {{tt|ENOTBLK}} || 15 || Block device required |- | {{tt|EBUSY}} || 16 || Device or resource busy |- | {{tt|EEXIST}} || 17 || File exists |- | {{tt|EXDEV}} || 18 || Invalid cross-device link |- | {{tt|ENODEV}} || 19 || No such device |- | {{tt|ENOTDIR}} || 20 || Not a directory |- | {{tt|EISDIR}} || 21 || Is a directory |- | {{tt|EINVAL}} || 22 || Invalid argument |- | {{tt|ENFILE}} || 23 || Too many open files in system |- | {{tt|EMFILE}} || 24 || Too many open files |- | {{tt|ENOTTY}} || 25 || Inappropriate ioctl for device |- | {{tt|ETXTBSY}} || 26 || Text file busy |- | {{tt|EFBIG}} || 27 || File too large |- | {{tt|ENOSPC}} || 28 || No space left on device |- | {{tt|ESPIPE}} || 29 || Illegal seek |- | {{tt|EROFS}} || 30 || Read-only file system |- | {{tt|EMLINK}} || 31 || Too many links |- | {{tt|EPIPE}} || 32 || Broken pipe |- | {{tt|EDOM}} || 33 || Numerical argument out of domain |- | {{tt|ERANGE}} || 34 || Numerical result out of range |- | {{tt|EDEADLK}} || 35 || Resource deadlock avoided |- | {{tt|ENAMETOOLONG}} || 36 || File name too long |- | {{tt|ENOLCK}} || 37 || No locks available |- | {{tt|ENOSYS}} || 38 || Function not implemented |- | {{tt|ENOTEMPTY}} || 39 || Directory not empty |- | {{tt|ELOOP}} || 40 || Too many levels of symbolic links |- | {{tt|ENOMSG}} || 42 || No message of desired type |- | {{tt|EIDRM}} || 43 || Identifier removed |- | {{tt|ECHRNG}} || 44 || Channel number out of range |- | {{tt|EL2NSYNC}} || 45 || Level 2 not synchronized |- | {{tt|EL3HLT}} || 46 || Level 3 halted |- | {{tt|EL3RST}} || 47 || Level 3 reset |- | {{tt|ELNRNG}} || 48 || Link number out of range |- | {{tt|EUNATCH}} || 49 || Protocol driver not attached |- | {{tt|ENOCSI}} || 50 || No CSI structure available |- | {{tt|EL2HLT}} || 51 || Level 2 halted |- | {{tt|EBADE}} || 52 || Invalid exchange |- | {{tt|EBADR}} || 53 || Invalid request descriptor |- | {{tt|EXFULL}} || 54 || Exchange full |- | {{tt|ENOANO}} || 55 || No anode |- | {{tt|EBADRQC}} || 56 || Invalid request code |- | {{tt|EBADSLT}} || 57 || Invalid slot |- | {{tt|EBFONT}} || 59 || Bad font file format |- | {{tt|ENOSTR}} || 60 || Device not a stream |- | {{tt|ENODATA}} || 61 || No data available |- | {{tt|ETIME}} || 62 || Timer expired |- | {{tt|ENOSR}} || 63 || Out of streams resources |- | {{tt|ENONET}} || 64 || Machine is not on the network |- | {{tt|ENOPKG}} || 65 || Package not installed |- | {{tt|EREMOTE}} || 66 || Object is remote |- | {{tt|ENOLINK}} || 67 || Link has been severed |- | {{tt|EADV}} || 68 || Advertise error |- | {{tt|ESRMNT}} || 69 || Srmount error |- | {{tt|ECOMM}} || 70 || Communication error on send |- | {{tt|EPROTO}} || 71 || Protocol error |- | {{tt|EMULTIHOP}} || 72 || Multihop attempted |- | {{tt|EDOTDOT}} || 73 || RFS specific error |- | {{tt|EBADMSG}} || 74 || Bad message |- | {{tt|EOVERFLOW}} || 75 || Value too large for defined data type |- | {{tt|ENOTUNIQ}} || 76 || Name not unique on network |- | {{tt|EBADFD}} || 77 || File descriptor in bad state |- | {{tt|EREMCHG}} || 78 || Remote address changed |- | {{tt|ELIBACC}} || 79 || Can not access a needed shared library |- | {{tt|ELIBBAD}} || 80 || Accessing a corrupted shared library |- | {{tt|ELIBSCN}} || 81 || .lib section in a.out corrupted |- | {{tt|ELIBMAX}} || 82 || Attempting to link in too many shared libraries |- | {{tt|ELIBEXEC}} || 83 || Cannot exec a shared library directly |- | {{tt|EILSEQ}} || 84 || Invalid or incomplete multibyte or wide character |- | {{tt|ERESTART}} || 85 || Interrupted system call should be restarted |- | {{tt|ESTRPIPE}} || 86 || Streams pipe error |- | {{tt|EUSERS}} || 87 || Too many users |- | {{tt|ENOTSOCK}} || 88 || Socket operation on non-socket |- | {{tt|EDESTADDRREQ}} || 89 || Destination address required |- | {{tt|EMSGSIZE}} || 90 || Message too long |- | {{tt|EPROTOTYPE}} || 91 || Protocol wrong type for socket |- | {{tt|ENOPROTOOPT}} || 92 || Protocol not available |- | {{tt|EPROTONOSUPPORT}} || 93 || Protocol not supported |- | {{tt|ESOCKTNOSUPPORT}} || 94 || Socket type not supported |- | {{tt|EOPNOTSUPP}} || 95 || Operation not supported |- | {{tt|EPFNOSUPPORT}} || 96 || Protocol family not supported |- | {{tt|EAFNOSUPPORT}} || 97 || Address family not supported by protocol |- | {{tt|EADDRINUSE}} || 98 || Address already in use |- | {{tt|EADDRNOTAVAIL}} || 99 || Cannot assign requested address |- | {{tt|ENETDOWN}} || 100 || Network is down |- | {{tt|ENETUNREACH}} || 101 || Network is unreachable |- | {{tt|ENETRESET}} || 102 || Network dropped connection on reset |- | {{tt|ECONNABORTED}} || 103 || Software caused connection abort |- | {{tt|ECONNRESET}} || 104 || Connection reset by peer |- | {{tt|ENOBUFS}} || 105 || No buffer space available |- | {{tt|EISCONN}} || 106 || Transport endpoint is already connected |- | {{tt|ENOTCONN}} || 107 || Transport endpoint is not connected |- | {{tt|ESHUTDOWN}} || 108 || Cannot send after transport endpoint shutdown |- | {{tt|ETOOMANYREFS}} || 109 || Too many references: cannot splice |- | {{tt|ETIMEDOUT}} || 110 || Connection timed out |- | {{tt|ECONNREFUSED}} || 111 || Connection refused |- | {{tt|EHOSTDOWN}} || 112 || Host is down |- | {{tt|EHOSTUNREACH}} || 113 || No route to host |- | {{tt|EALREADY}} || 114 || Operation already in progress |- | {{tt|EINPROGRESS}} || 115 || Operation now in progress |- | {{tt|ESTALE}} || 116 || Stale file handle |- | {{tt|EUCLEAN}} || 117 || Structure needs cleaning |- | {{tt|ENOTNAM}} || 118 || Not a XENIX named type file |- | {{tt|ENAVAIL}} || 119 || No XENIX semaphores available |- | {{tt|EISNAM}} || 120 || Is a named type file |- | {{tt|EREMOTEIO}} || 121 || Remote I/O error |- | {{tt|EDQUOT}} || 122 || Disk quota exceeded |- | {{tt|ENOMEDIUM}} || 123 || No medium found |- | {{tt|EMEDIUMTYPE}} || 124 || Wrong medium type |- | {{tt|ECANCELED}} || 125 || Operation canceled |- | {{tt|ENOKEY}} || 126 || Required key not available |- | {{tt|EKEYEXPIRED}} || 127 || Key has expired |- | {{tt|EKEYREVOKED}} || 128 || Key has been revoked |- | {{tt|EKEYREJECTED}} || 129 || Key was rejected by service |- | {{tt|EOWNERDEAD}} || 130 || Owner died |- | {{tt|ENOTRECOVERABLE}} || 131 || State not recoverable |- | {{tt|ERFKILL}} || 132 || Operation not possible due to RF-kill |- | {{tt|EHWPOISON}} || 133 || Memory page has hardware error |- | {{tt|ENOTSUP}} || 134 || Not supported parameter or option |- | {{tt|ENOMEDIUM}} || 135 || Missing media |- | {{tt|EILSEQ}} || 138 || Invalid multibyte sequence |- | {{tt|EOVERFLOW}} || 139 || Value too large |- | {{tt|ECANCELED}} || 140 || Asynchrononous operation stopped before normal completion |- | {{tt|ENOTRECOVERABLE}} || 141 || State not recoverable |- | {{tt|EOWNERDEAD}} || 142 || Previous owner died |- | {{tt|ESTRPIPE}} || 143 || Streams pipe error |} The macro names and meanings for error codes are defined in the [https://pubs.opengroup.org/onlinepubs/9799919799/ POSIX Standards definition] however the numeric values are NOT, though by convention the values appear to be the same across different versions of Unix.{{citation needed|date=April 2025}} Programs should not rely on specific numeric values and should test code using the macro names specified in the ERRORS section of the [[man page]] of the associated function. For source [[Code readability|code readability]] and [[Software portability| portability]] the use of the standard macro names in code is highly recommended.<ref>{{cite web |author=<!-- not stated --> |date=Jan 26, 2025 |title=Checking for Errors |url=https://www.gnu.org/software/libc/manual/html_node/Checking-for-Errors.html |website=gnu.org |publisher=Free Software Foundation |access-date=Apr 6, 2025}} </ref><ref>{{cite book|arxiv=2401.10422 |doi=10.1145/3597503.3623323 |chapter=Semantic Analysis of Macro Usage for Portability |title=Proceedings of the IEEE/ACM 46th International Conference on Software Engineering |date=2024 |last1=Pappas |first1=Brent |last2=Gazzillo |first2=Paul |pages=1β12 |isbn=979-8-4007-0217-4 }} </ref> <!--The recommendation is generic, not specific but does refer extensively to porting kernel routines where error code macros are likely to be found in large numbers. -->
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)