errno.h(7POSIX)

๐Ÿ’– errno.h โ€” POSIX Programmer's Manual, section 7POSIX ๐Ÿ’–

okay bestie, sit down, hydrate, because we're about to get into errno.h(7POSIX) and honestly? it's giving โœจfoundationalโœจ


๐ŸŒธ PROLOG ๐ŸŒธ

Real talk first: this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ โ€” so if you're on Linux, go consult the corresponding Linux manual page for the tea on Linux behavior. And plot twist: the interface might not even be implemented on Linux at all. ๐Ÿ™ˆ


๐Ÿ‘‘ NAME ๐Ÿ‘‘

errno.h โ€” system error numbers


โœจ SYNOPSIS โœจ

#include <errno.h>

๐Ÿ’… DESCRIPTION ๐Ÿ’…

Some of the functionality described on this reference page extends the ISO C standard. And if there's any conflict between the requirements described here and the ISO C standard? Not intentional, bestie, it's a whole accident. This volume of POSIX.1-2017 defers to the ISO C standard.

The ISO C standard only requires the symbols [EDOM], [EILSEQ], and [ERANGE] to be defined. That's it. Those three. The bare minimum. ๐Ÿ˜ญ

The <errno.h> header shall provide a declaration or definition for errno. The symbol errno shall expand to a modifiable lvalue of type int. It is unspecified whether errno is a macro or an identifier declared with external linkage. And listen โ€” if a macro definition is suppressed in order to access an actual object, or a program defines an identifier with the name errno, the behavior is undefined. ๐Ÿšจ

The <errno.h> header shall define the following macros, which shall expand to integer constant expressions with type int, distinct positive values (except as noted below, iykyk), and which shall be suitable for use in #if preprocessing directives:

  • E2BIG โ€” Argument list too long. ๐Ÿฅต
  • EACCES โ€” Permission denied. ๐Ÿšซ
  • EADDRINUSE โ€” Address in use. occupied fr.
  • EADDRNOTAVAIL โ€” Address not available. ๐Ÿ˜ญ
  • EAFNOSUPPORT โ€” Address family not supported. not her moment.
  • EAGAIN โ€” Resource unavailable, try again (may be the same value as [EWOULDBLOCK]).
  • EALREADY โ€” Connection already in progress. we've BEEN doing this.
  • EBADF โ€” Bad file descriptor. ๐Ÿ’€
  • EBADMSG โ€” Bad message. ๐Ÿ’…
  • EBUSY โ€” Device or resource busy. she's booked and blessed.
  • ECANCELED โ€” Operation canceled. ๐Ÿ’”
  • ECHILD โ€” No child processes. empty nest energy.
  • ECONNABORTED โ€” Connection aborted. ๐Ÿ˜ฌ
  • ECONNREFUSED โ€” Connection refused. the audacity.
  • ECONNRESET โ€” Connection reset. ๐Ÿฆ‹
  • EDEADLK โ€” Resource deadlock would occur. bestie RUN.
  • EDESTADDRREQ โ€” Destination address required. you forgot something.
  • EDOM โ€” Mathematics argument out of domain of function. math said no. ๐Ÿงฎ
  • EDQUOT โ€” Reserved.
  • EEXIST โ€” File exists. already iconic, no need for a rerun.
  • EFAULT โ€” Bad address. ๐Ÿšฉ
  • EFBIG โ€” File too large. it's giving overstuffed.
  • EHOSTUNREACH โ€” Host is unreachable. ghosted, literally. ๐Ÿ‘ป
  • EIDRM โ€” Identifier removed. ๐Ÿ’จ
  • EILSEQ โ€” Illegal byte sequence. ๐Ÿšจ
  • EINPROGRESS โ€” Operation in progress. hold on, we're cooking. ๐Ÿ”ฅ
  • EINTR โ€” Interrupted function. rude tbh.
  • EINVAL โ€” Invalid argument. ๐Ÿšฉ๐Ÿšฉ
  • EIO โ€” I/O error. ๐Ÿ’€
  • EISCONN โ€” Socket is connected. she's taken.
  • EISDIR โ€” Is a directory. yes queen, a directory.
  • ELOOP โ€” Too many levels of symbolic links. it's a loop, we're dizzy. ๐ŸŒ€
  • EMFILE โ€” File descriptor value too large. ๐Ÿซ 
  • EMLINK โ€” Too many links. chainmail energy.
  • EMSGSIZE โ€” Message too large. ๐Ÿ’Œ๐Ÿ“ˆ
  • EMULTIHOP โ€” Reserved.
  • ENAMETOOLONG โ€” Filename too long. she wrote a whole essay. ๐Ÿ˜ญ
  • ENETDOWN โ€” Network is down. wifi said bye. ๐Ÿ“ต
  • ENETRESET โ€” Connection aborted by network. not your fault, blame the network. ๐Ÿ˜ค
  • ENETUNREACH โ€” Network unreachable. ๐ŸŒซ๏ธ
  • ENFILE โ€” Too many files open in system. ๐Ÿ˜ตโ€๐Ÿ’ซ
  • ENOBUFS โ€” No buffer space available. no room at the inn. ๐ŸŽ€
  • ENODATA โ€” No message is available on the STREAM head read queue. ๐Ÿ“ญ
  • ENODEV โ€” No such device. ๐Ÿ”
  • ENOENT โ€” No such file or directory. the classic. THE classic. ๐Ÿ’”
  • ENOEXEC โ€” Executable file format error. ๐Ÿงฉ
  • ENOLCK โ€” No locks available. ๐Ÿ”’
  • ENOLINK โ€” Reserved.
  • ENOMEM โ€” Not enough space. bestie your memory is full. ๐Ÿง ๐Ÿ’ฅ
  • ENOMSG โ€” No message of the desired type. ๐Ÿ’ฌ
  • ENOPROTOOPT โ€” Protocol not available. ๐Ÿ™…
  • ENOSPC โ€” No space left on device. disk said "no <3". ๐Ÿ’ฝ
  • ENOSR โ€” No STREAM resources. ๐ŸŒŠ
  • ENOSTR โ€” Not a STREAM. ๐ŸŒŠโŒ
  • ENOSYS โ€” Functionality not supported. not implemented, not her problem. ๐Ÿ’…
  • ENOTCONN โ€” The socket is not connected. ๐Ÿชซ
  • ENOTDIR โ€” Not a directory or a symbolic link to a directory. โš ๏ธ
  • ENOTEMPTY โ€” Directory not empty. she still has her stuff there. ๐Ÿ“ฆ
  • ENOTRECOVERABLE โ€” State not recoverable. rip. ๐Ÿ˜ต
  • ENOTSOCK โ€” Not a socket. ๐Ÿงฆ
  • ENOTSUP โ€” Not supported (may be the same value as [EOPNOTSUPP]).
  • ENOTTY โ€” Inappropriate I/O control operation. inappropriate, you said it not me. ๐Ÿ™ˆ
  • ENXIO โ€” No such device or address. ๐Ÿ•ณ๏ธ
  • EOPNOTSUPP โ€” Operation not supported on socket (may be the same value as [ENOTSUP]).
  • EOVERFLOW โ€” Value too large to be stored in data type. too much for the container. ๐Ÿ“ฆ๐Ÿ’ฅ
  • EOWNERDEAD โ€” Previous owner died. โšฐ๏ธ
  • EPERM โ€” Operation not permitted. nope, and not in a cute way. ๐Ÿšซ
  • EPIPE โ€” Broken pipe. ๐Ÿ’”๐Ÿšฌ
  • EPROTO โ€” Protocol error. ๐Ÿ› ๏ธ
  • EPROTONOSUPPORT โ€” Protocol not supported. ๐Ÿ™…โ€โ™€๏ธ
  • EPROTOTYPE โ€” Protocol wrong type for socket. wrong vibe entirely. ๐Ÿšฉ
  • ERANGE โ€” Result too large. ๐Ÿ“ˆ
  • EROFS โ€” Read-only file system. look, don't touch. ๐Ÿ‘€
  • ESPIPE โ€” Invalid seek. ๐ŸŽฏโŒ
  • ESRCH โ€” No such process. she left the group chat. ๐Ÿ‘‹
  • ESTALE โ€” Reserved.
  • ETIME โ€” Stream ioctl() timeout. โฐ
  • ETIMEDOUT โ€” Connection timed out. โณ
  • ETXTBSY โ€” Text file busy. she's writing, don't interrupt. โœ๏ธ
  • EWOULDBLOCK โ€” Operation would block (may be the same value as [EAGAIN]).
  • EXDEV โ€” Cross-device link. different worlds fr. ๐ŸŒ

The following sections are informative. โ€” translation: not the rules, just the commentary. ๐ŸŽ€


๐Ÿฆ‹ APPLICATION USAGE ๐Ÿฆ‹

Additional error numbers may be defined on conforming systems; see the System Interfaces volume of POSIX.1-2017. so like, there's more where that came from, bestie. โœจ


๐ŸŒˆ RATIONALE ๐ŸŒˆ

None.

literally none. nothing. we said what we said. ๐Ÿ’…


โญ FUTURE DIRECTIONS โญ

None.

nothing on the horizon. the future is bright and also empty. ๐Ÿ˜Œ


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

  • The System Interfaces volume of POSIX.1-2017, Section 2.3, Error Numbers

Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .

Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .


okay that's the whole page, and the sign-off is literally this: this beauty came from IEEE/The Open Group, 2017, and it lives under the name errno.h(7POSIX). ๐Ÿซถ go forth, check your errnos, and remember โ€” ENOENT is not a personality trait. periodt. ๐ŸŽ€โœจ๐Ÿ’–

๐Ÿ“ฆ where this page comes from