Fact-checked by Grok 2 weeks ago

errno.h

<errno.h> is a header file in the that declares the modifiable integer variable errno, a thread-local (since ) lvalue initialized to 0 at program startup, which system calls and library functions set to positive integer values to report s upon failure. It also defines symbolic constants for these error codes, providing unique positive integers for conditions such as EDOM (domain ), ERANGE (range ), and EILSEQ (illegal byte sequence), as required by the ISO , with additional constants mandated by for system-specific errors like EACCES (permission denied) and ENOENT (no such or directory). The errno mechanism ensures that error information is preserved across function calls, though its value should be checked and saved immediately after a failing operation, as subsequent library calls may overwrite it. Defined since the original C89 standard and extended in later revisions like C99 and C11, <errno.h> facilitates portable error handling in C programs by standardizing error reporting across compliant systems, while allowing implementations to include platform-specific extensions. In POSIX environments, the header guarantees at least 60 distinct error constants, with values that must remain unique except in cases like EAGAIN and EWOULDBLOCK, which may alias each other. Functions like perror() and strerror() from the same library use these codes to provide human-readable error messages.

Overview

Definition and Purpose

The <errno.h> header file is a standard component of library, providing a macro for the symbol errno, which expands to a modifiable lvalue of type int and defining macros that represent distinct positive error numbers, typically prefixed with E (such as EDOM or ERANGE). These macros encode specific error conditions encountered during program execution, enabling standardized identification of failures across compliant systems. The primary purpose of <errno.h> is to facilitate portable error reporting in system calls and library functions, where a function's return value (often -1 or NULL) signals failure, but the precise reason is stored separately in errno rather than being returned directly. This design allows functions to distinguish between valid negative or null results and error states without ambiguity, promoting consistency in error handling across different implementations of the C standard. In operation, errno is set to a non-zero value by qualifying functions upon detecting an error, while successful calls do not set it to 0 and may either leave it unchanged or set it to another non-zero value. Notably, errno is not a function but expands to a modifiable lvalue of type int, permitting direct assignment and inspection by the programmer; in modern implementations conforming to C11 and POSIX, it employs thread-local storage to ensure isolation of error states across concurrent threads.

Standards Compliance

The errno.h header is included in the ISO C standards starting from C89 (ISO/IEC 9899:1990), where it requires a declaration or definition for the symbol errno, which expands to a modifiable lvalue of type int, along with at least two specific error code macros: EDOM for domain errors (e.g., invalid arguments to mathematical functions) and ERANGE for range errors (e.g., overflow or underflow in computations). These macros must expand to distinct positive integer constant expressions, ensuring they do not overlap with zero or each other, to facilitate portable error checking across implementations. The C89 standard focuses on error reporting for library functions in headers like <math.h> and <stdlib.h>, without specifying thread-related behaviors. POSIX.1 compliance, as defined by IEEE Std 1003.1, extends these requirements significantly for system interfaces, mandating errno as a thread-specific value—meaning each thread in a maintains its own independent copy, unaffected by operations in other threads—and a minimum set of over 30 error code macros, including core ones like EACCES (permission denied), ENOENT (no such file or directory), EBADF (bad ), and EINVAL (invalid argument). These POSIX macros also expand to distinct positive integers, with the standard prohibiting any from setting errno to zero and requiring that its value only be examined after a indicates an error via its return value. This ensures reliable error propagation in multi-threaded environments on compliant systems. The standards have evolved to enhance portability and safety: (ISO/IEC 9899:1999) explicitly requires errno to be a modifiable lvalue, allowing programs to inspect and potentially reset it after error checks, while adding the EILSEQ macro for invalid multibyte sequences. .1-2008 (IEEE Std 1003.1-2008) further strengthens thread-safety guarantees by clarifying that all specified functions are thread-safe unless exempted, with errno treated as thread-local to prevent race conditions, and introducing additional macros like ENOTRECOVERABLE and EOWNERDEAD for robust mutex handling. These updates align with contemporary ISO C revisions, promoting consistent across and other compliant platforms without mandating specific numeric values for the macros, only their distinctiveness.

Error Handling Fundamentals

The errno Variable

The errno variable is declared in the <errno.h> header as an external integer modifiable lvalue, accessible only after including the header to define associated macros. Programs must include <errno.h> to use errno alongside the symbolic error constants it references. Upon failure, functions and system calls set errno to a non-zero value representing the specific condition, such as fopen assigning ENOENT when a file is not found. This value must be inspected immediately after the function returns an error indicator, as subsequent calls to other functions may overwrite errno with their own error states if they fail. The variable initializes to 0 at program startup, and no standard function ever resets it to 0; thus, a non-zero value after a failed call signals an identifiable through the E* macros defined in <errno.h>. For thread safety in multi-threaded environments using threads (), each thread maintains its own instance of errno since the POSIX.1-2001 standard, ensuring that modifications in one thread do not affect others. To achieve this, errno is often implemented not as a simple but as a that expands to a function call retrieving , such as (*__errno_location()) in / systems. This design enhances portability across thread-aware implementations while preserving the interface's semantics.

Error Code Macros

The error code macros in <errno.h> are symbolic constants, typically prefixed with E (such as EPERM and ENOENT), that represent distinct error conditions encountered during program execution. These macros expand to integer constant expressions of type int, each evaluating to a unique positive integer value greater than or equal to 1, ensuring no overlaps in their numerical representations across compliant implementations. This design allows for clear identification of specific errors without relying on platform-dependent numeric codes, providing a standardized abstraction layer over underlying system error numbers. The (ISO) mandates a minimal core set of these macros to support reporting in mathematical s and other library operations. Specifically, EDOM indicates a (e.g., invalid argument to a like sqrt(-1)), ERANGE signals a result out of range (e.g., overflow in exp()), and EILSEQ denotes an invalid or incomplete multibyte sequence, as added in the revision. .1 extends this requirement significantly, mandating a broader collection of macros for system calls and library functions, including examples like EBADF for bad file descriptors; however, certain STREAMS-related macros (e.g., ENODATA) are optional and considered obsolescent in modern revisions. Implementations may also define additional non-standard macros, such as EWOULDBLOCK for non-blocking operations that would block, which on some systems aliases to EAGAIN but maintains distinct semantics for portability. In practice, programmers use these macros to check the value of the errno variable after a call that may fail, promoting code portability across different systems. For instance, after an unsuccessful open operation, one might if (errno == ENOENT) to handle the "no such or " condition, rather than comparing against a hardcoded integer like 2, which could vary by platform. This approach leverages the macros' expansion to int expressions, enabling their use in conditional statements, switches, or preprocessing directives while avoiding direct numeric dependencies. By encapsulating error numbers in named symbols, the macros facilitate readable, maintainable code that adheres to standards without exposing implementation details.

POSIX Error Codes

Core POSIX Errors

The core POSIX error codes form a foundational set of over 60 macros defined in the <errno.h> header, representing essential error conditions for system calls and library functions in -compliant environments. These macros expand to unique positive values, though the specific numeric assignments are implementation-defined to allow flexibility across systems. They enable portable error reporting, ensuring that applications can detect and handle failures consistently without relying on platform-specific details. The following table enumerates selected common core POSIX error codes, providing a brief description of each and typical causes or triggers, often arising in operations, , or . For a complete list, refer to the standard. The following table enumerates selected common POSIX error codes, providing a brief description of each and typical causes or triggers, often arising in file operations, process management, or resource allocation.
CodeDescriptionCommon Triggers
EPERMOperation not permittedAttempting to perform a privileged operation, such as changing file ownership without root privileges, in functions like chmod().
ENOENTNo such file or directorySpecifying a nonexistent pathname in open() or stat(), where the file or directory path does not exist.
ESRCHNo such processSearching for a process ID that does not exist, as in kill() or waitpid() when the PID is invalid.
EINTRInterrupted functionA system call like read() or wait() being interrupted by a signal before completion.
EIOI/O errorLow-level input/output failure during disk or device operations, such as in read() on a failing hardware device.
ENOEXECExecutable format errorLoading an executable file with an invalid or unsupported format via execve().
EBADFBad file descriptorUsing an invalid or closed file descriptor in read() or close().
ECHILDNo child processesCalling wait() when no child processes exist or have already been reaped.
EAGAINResource temporarily unavailableAttempting a non-blocking operation like read() when no data is available immediately, often requiring retry.
ENOMEMNot enough spaceAllocation failure due to insufficient memory or other resources in malloc() or fork().
EACCESPermission deniedAccessing a file or directory without read/write permissions via open() or access().
EFAULTBad addressPassing an invalid memory address to a system call like read() or write().
EBUSYDevice or resource busyAttempting to unmount a filesystem that is in use or remounting a busy device.
EEXISTFile existsTrying to create a file or directory that already exists with open() using O_CREAT
EXDEVCross-device linkCreating a hard link between files on different filesystems via link().
ENODEVNo such deviceReferencing a device that does not exist in the system, such as in mount operations.
ENOTDIRNot a directoryTreating a non-directory file as a directory in chdir() or path traversal.
EISDIRIs a directoryAttempting to open a directory as a regular file with open() in read/write mode.
EINVALInvalid argumentPassing an inappropriate or out-of-range argument to a function like lseek().
ENFILEToo many files open in systemExceeding the system-wide limit on open files during open().
EMFILEToo many open filesSurpassing the per-process limit on open file descriptors in open().
ENOTTYInappropriate I/O control operationUsing ioctl() on a file descriptor not associated with a terminal or suitable device.
ETXTBSYText file busyAttempting to write to or execute a file that is currently being executed by another process.
EFBIGFile too largeWriting beyond the maximum file size limit in write().
ENOSPCNo space left on deviceDisk full during write() or file creation operations.
ESPIPEInvalid seekSeeking on a pipe or socket with lseek(), where positioning is not supported.
EROFSRead-only file systemAttempting to write or modify a file on a read-only mounted filesystem.
EMLINKToo many linksCreating a hard link that would exceed the maximum number allowed per file.
EPIPEBroken pipeWriting to a pipe after the reading end has been closed, often in write().

Usage in System Calls

In POSIX-compliant systems, system calls such as read(), write(), and open() follow a standard error-reporting pattern: upon failure, they return -1 and set the global errno variable to an appropriate positive macro defined in <errno.h>, such as EACCES or EINVAL. This mechanism provides detailed diagnostics beyond a mere success/failure indication, enabling developers to implement targeted error recovery strategies in robust applications. By distinguishing between various failure modes—ranging from permission denials to resource shortages—errno supports precise handling of exceptional conditions in system-level programming. POSIX.1 mandates that all failing system calls set errno to one of the defined error codes unless explicitly documented otherwise, ensuring consistent behavior across compliant implementations. For instance, the fork() system call returns -1 on failure and sets errno to EAGAIN if insufficient resources prevent process creation, such as when system-imposed limits on processes or threads are reached. Similarly, mkdir() returns -1 and sets errno to EEXIST if the specified directory already exists, preventing accidental overwrites or conflicts. These examples illustrate how errno integrates directly with system call semantics to convey specific failure reasons, facilitating debugging and resilience in POSIX environments. Best practices for using errno with system calls emphasize checking the return value first: only inspect errno if the call returns -1, as its value is undefined or irrelevant on success and may be altered by intervening operations. This approach avoids false positives, since successful calls do not reset or guarantee the preservation of prior errno values. Note that while system calls reliably set errno on failure, some library functions like printf() do not set it even on error, relying instead on their return value (e.g., a negative count) for failure indication. Adhering to this protocol ensures accurate error detection and prevents misinterpretation in multi-step operations.

Platform Variations

Unix-like Implementations

In operating systems, the errno.h header file provides a standardized for error reporting through the errno and associated macros, with implementations that adhere closely to specifications while incorporating platform-specific extensions. These systems, including and BSD variants, define errno as a thread-local to support multithreaded environments, ensuring that error codes set by system calls are accessible per thread without interference. The header typically includes all core error codes, such as ENOENT (value 2, indicating "no such file or directory") and EACCES (value , for "permission denied"), which originated from early Unix designs and were formalized in standards like POSIX.1-1988. Note that while symbolic constants are standardized, their numeric values are implementation-defined and may vary across systems. In , the errno.h header is provided by C Library (), where errno is implemented as a expanding to a call to the function __errno_location(), which returns a pointer to the thread-local errno storage. This approach allows to manage errno efficiently in multithreaded applications using the Native Thread Library (NPTL). Beyond -required codes, extends errno.h with kernel-specific errors, such as ENETRESET (value 102, indicating "Network dropped connection because of reset") and EHWPOISON (value 133, for hardware memory corruption detected by the kernel). These extensions are documented in the Linux man pages and reflect the operating system's integration of advanced networking and hardware features. BSD-derived systems, such as , implement errno.h in a manner similar to but with distinct extensions tailored to their kernel architecture. In , errno is implemented as a thread-local variable using the system's TLS facilities to maintain isolation across concurrent executions. 's errno.h includes codes plus BSD-specific ones like ENOATTR (value 87, indicating "attribute not found") and EOPNOTSUPP (value 45, for "operation not supported on socket"), the latter being a common Unix extension not mandated by strict but widely adopted for socket and filesystem operations. These implementations ensure compatibility with while accommodating BSD's emphasis on networking and security features. Traditional Unix variants, such as System V Release 4, established the numeric values for many errno codes that continue to influence modern systems, with ENOENT consistently defined as 2 since the to enable portable error checking across utilities and libraries. Some systems further integrate signals with errno for asynchronous error handling; for instance, writing to a after the reader has closed it sets errno to EPIPE (value 32) and generates a SIGPIPE signal, which can terminate the process unless explicitly ignored or handled. This combination enhances robustness in networked and scenarios common to Unix environments.

Non-POSIX Extensions

In environments like Windows, compatibility layers such as and provide POSIX-compliant errno.h implementations by mapping standard error codes to underlying Windows error values returned by functions like GetLastError. For instance, the code ENOENT (value 2, indicating "No such file or directory") directly corresponds to the Windows error ERROR_FILE_NOT_FOUND (also 2), while socket-related errors like EADDRINUSE (value 98, "Address already in use") are derived from Winsock equivalents such as WSAEADDRINUSE (10048). These mappings ensure that applications can run with familiar error semantics, though internal translations may introduce subtle behavioral differences from native Unix systems. Beyond core definitions, various platforms introduce additional error macros in errno.h to address system-specific conditions. On macOS, which builds on BSD foundations, ENOTSUP (value 45, "Operation not supported") is defined as an extension distinct from the POSIX-required EOPNOTSUPP, providing a finer-grained indication for unsupported operations in certain kernel interfaces. In embedded systems using lightweight libraries like Newlib, rarely used or hardware-irrelevant codes—such as ECHRNG (44, "Channel number out of range," a legacy Linux-specific error for obsolete peripherals)—may be omitted to reduce footprint and simplify porting to resource-constrained devices without full compliance. Compatibility layers like Wine, which enable POSIX applications to execute on Windows, perform bidirectional error translation by converting Windows NT status codes or GetLastError values into equivalent errno settings for POSIX system calls, ensuring seamless error propagation in emulated environments. The ISO C standard permits implementations to define additional E-prefixed macros beyond the required EDOM, EILSEQ, and ERANGE, provided they expand to unique positive integer constants to avoid conflicts with standard ones. Some non-POSIX systems, particularly certain microkernels or custom embedded runtimes, deviate by using negative values for errno to mimic kernel syscall conventions in user space, though this conflicts with the positive-value requirement in ISO C and POSIX. These non-standard extensions and variations create portability challenges, often necessitating conditional directives such as #ifdef _WIN32 or #ifdef APPLE to select platform-appropriate handling and avoid from macros.

Historical Context

Origins in Early Unix

The errno.h header file originated in , released in 1979 by researchers at Bell Laboratories, where it was introduced to standardize reporting mechanisms within the C programming libraries. This development marked a significant step toward consistent handling of failures, allowing programmers to access predefined codes as macros rather than relying on scattered numeric constants. By encapsulating definitions in a dedicated header, it facilitated more reliable and portable across Unix applications. Prior to Version 7, earlier iterations of Unix, such as Version 6 released in , employed ad-hoc error returns from system calls, where failures typically yielded -1 or an invalid value without a unified framework for interpretation. While the errno variable existed as an external integer to capture error numbers in C programs—set only upon failure and left unchanged on success—the absence of a formal header meant error codes were not systematically defined or included, leading to inconsistencies in library usage. The formalization in errno.h established a global error state that improved debugging and maintainability. Ken Thompson and Dennis Ritchie, principal architects of Unix and the C language, played key roles in integrating errno.h into the , emphasizing portability for applications running on PDP-11 systems and beyond. Their efforts ensured that error reporting aligned with the growing ecosystem of Unix tools, drawing on the evolving to define symbolic constants. The original errno.h in Version 7 defined 34 error codes, from EPERM (1, operation not permitted) to ERANGE (34, result too large), covering common system and mathematical errors. Early implementations of errno, including in Version 7, were inherently limited by Unix's single-process model, assuming a accessible only within one execution and lacking provisions for concurrency. This design was not thread-safe, as concurrent access in later multi-threaded environments could lead to conditions overwriting the error state; such issues were addressed in subsequent standards through per-thread storage.

Standardization Process

The standardization of errno.h began with its formal inclusion in the standard, designated as X3.159-1989, which was published in December 1989. This standard required the declaration of the errno variable as a modifiable lvalue of type and defined basic error macros, primarily and ERANGE, to handle domain and range errors in mathematical functions from <math.h>. These provisions ensured that library functions could report errors consistently without relying on return value conventions alone, marking the first portable specification for error reporting in C programs across diverse implementations. The standards further expanded and formalized errno.h for systems. In (IEEE Std 1003.1-1990, also ISO/IEC 9945-1:1990), a comprehensive set of error codes was mandated for system interfaces, building on the foundation to include symbols like EPERM, ENOENT, and EACCES for common file and process operations. By (IEEE Std 1003.1-2001), the requirement grew to over 50 distinct error codes, ensuring among conforming systems while allowing implementation-defined extensions. This adoption harmonized variations among Unix variants, with the POSIX working group in 1988 playing a pivotal role in reconciling differences from systems like BSD and System V. Subsequent ISO C standards refined these aspects without major overhauls. The C99 standard (ISO/IEC 9899:1999) reinforced recommendations for thread-safety in errno access, suggesting implementations treat it as a macro expanding to thread-local storage to avoid race conditions in multithreaded environments. The C11 standard (ISO/IEC 9899:2011) introduced no significant changes to the error macros but explicitly clarified that errno must be an lvalue modifiable by library functions, aligning closely with POSIX requirements. A notable update occurred in the 2008 POSIX revision (IEEE Std 1003.1-2008), which incorporated real-time extensions and additional error codes like EOWNERDEAD for enhanced support in embedded and concurrent systems. Through these standardization efforts, errno.h achieved broad portability, enabling developers to write -handling code that functions consistently across platforms. Today, while mandates a core set, variants like extend to over 100 possible codes, including platform-specific ones such as ENOSYS for unimplemented operations, without breaking conformance.

Practical Usage

Accessing and Interpreting Errors

In -compliant systems, programmers access the errno value immediately following a or that returns an indicator, typically -1 or , to determine the specific condition. The standard access pattern involves including the <errno.h> header to access the errno macro, which expands to a modifiable lvalue, and then checking its value conditionally, such as if (some_function() == -1) { if (errno == ENOENT) { /* handle no such file [error](/page/Error) */ } }. This ensures that errno is examined only when an has occurred, as its value is unspecified or irrelevant after successful calls. Applications should set errno to 0 prior to invoking a known to potentially set it, and inspect it solely after the function indicates failure, to avoid misinterpretation from prior or extraneous modifications. To interpret the numeric errno value into a human-readable form, the strerror() from <string.h> is used, which maps the provided number—commonly errno—to a locale-dependent describing the . For instance, strerror(ENOENT) typically yields a message such as "No such file or directory," though the exact wording is implementation-defined and may vary by . The returned pointer points to a static that should not be modified and may be overwritten by subsequent calls to strerror() or related . For diagnostic output, the perror() from <stdio.h> combines a user-supplied prefix with the message derived from errno via an internal call to strerror(), printing the result to followed by a ; an example usage is perror("open failed"), which might output "open failed: No such file or directory". Both facilitate without requiring manual mapping of codes. Best practices emphasize preserving the errno value promptly after detection to prevent loss due to intervening function calls that might alter it, such as by assigning it to a local variable: int saved_errno = errno;. Programmers must avoid assuming or checking errno after successful operations, as it may be modified unpredictably, and should never rely on its value without an accompanying error return code. Notably, not all POSIX functions employ errno for error reporting; for example, getaddrinfo() from <netdb.h> returns its own error codes (e.g., EAI_NONAME) and uses gai_strerror() for interpretation, resorting to errno only in the EAI_SYSTEM case.

Multithreading and Thread-Safety

In multithreaded programs, the errno macro in <errno.h> is required by POSIX.1-2001 to expand to a modifiable lvalue of type int with duration, ensuring each maintains its own independent copy of the error value without interference from other . This design prevents race conditions where one 's or library function could overwrite the error status observed by another . Implementations typically achieve this through macros, such as errno = (*__errno_location()) in systems, where __errno_location() returns a pointer to the thread-specific integer. Prior to widespread adoption of threads, older threading libraries like LinuxThreads (used in early versions before NPTL in 2003) sometimes exhibited issues with shared errno access in certain configurations, leading to unpredictable error reporting and potential data races in concurrent code. Legacy code assuming a single global errno across the process could thus fail in multithreaded environments, as concurrent modifications would corrupt error values. To mitigate such problems, developers should avoid treating errno as a process-wide global and instead rely on its thread-local nature; for custom per-thread error storage beyond standard errno, recommends using pthread_key_create() and pthread_getspecific() to manage thread-specific data safely. The standard and .1-2008 further reinforce by mandating that errno has storage duration, guaranteeing no data races during access or modification within the same , as long as the program adheres to the standards' concurrency rules. This ensures deterministic behavior in concurrent executions without requiring additional primitives for errno itself. In programming frameworks like , which build on threads, errno propagation is handled via thread-local instances, allowing library calls within regions to set and retrieve errors independently per without cross-thread contamination.

References

  1. [1]
    errno - cppreference.com
    Feb 2, 2025 · Typically, the value of errno is set to one of the error codes listed in <errno.h> as macro constants beginning with the letter E followed by ...
  2. [2]
    <errno.h>
    The <errno.h> header shall provide a declaration for errno and give positive values for the following symbolic constants. Their values shall be unique except as ...
  3. [3]
    errno(3) - Linux manual page - man7.org
    The <errno.h> header file defines symbolic names for each of the possible error numbers that may appear in errno. All the error names specified by POSIX.1 must ...
  4. [4]
    <errno.h>
    The <errno.h> header shall provide a declaration or definition for errno. The symbol errno shall expand to a modifiable lvalue of type int.
  5. [5]
    [PDF] Rationale for International Standard - Programming Language - C
    In early drafts of C89, errno and related macros were defined in <stddef.h>. When the C89 Committee decided that the other definitions in this header were ...
  6. [6]
    2. General Information
    No function in this volume of POSIX.1-2017 shall set errno to zero. For each thread of a process, the value of errno shall not be affected by function calls or ...
  7. [7]
    errno
    The setting of errno after a successful call to a function is unspecified unless the description of that function specifies that errno shall not be modified. If ...
  8. [8]
    Thread-safety and POSIX.1 - UNIX.org
    POSIX.1 and C-language functions were written to work in an environment of single-threaded processes. Reentrancy was not an issue in their design.Missing: compliance | Show results with:compliance
  9. [9]
    All about thread-local storage | MaskRay
    Feb 14, 2021 · Different threads have different errno copies. errno is typically defined as a function which returns a thread-local variable (e.g. __ ...
  10. [10]
    Error numbers - cppreference.com
    Feb 2, 2025 · Error codes​​ Each of the macros defined in <errno. h> expands to an integer constant expression with type int and with a unique positive value. ...
  11. [11]
    errno, _doserrno, _sys_errlist, and _sys_nerr | Microsoft Learn
    Feb 3, 2023 · Only ERANGE , EILSEQ , and EDOM are specified in the ISO C99 standard. For a complete list, see errno constants.
  12. [12]
    fork - The Open Group Publications Catalog
    The [EAGAIN] error exists to warn applications that such a condition might occur. Whether it occurs or not is not in any practical sense under the control ...
  13. [13]
    open
    ### General Pattern for System Calls like `open()` Returning -1 and Setting `errno`
  14. [14]
    fprintf
    ### Summary: Does `printf` or `fprintf` Set `errno` on Failure?
  15. [15]
    errno constants - Microsoft Learn
    Oct 21, 2022 · The errno constants are values assigned to errno for various error conditions. ERRNO.H contains the definitions of the errno values.
  16. [16]
    Error numbers - cppreference.com
    ### Summary of ISO C Standard on errno Macros and Allowances for Additional Ones
  17. [17]
    The UNIX System -- History and Timeline - UNIX.org
    The history of UNIX starts back in 1969, when Ken Thompson, Dennis Ritchie and others started working on the "little-used PDP-7 in a corner" at Bell Labs and ...
  18. [18]
  19. [19]
    [PDF] UNIX PROGRAMMER'S MANUAL - squoze.net
    May 13, 1975 · In- evitably, this means that many sections will soon be out of date. This manual is divided into eight sections: I. Commands. II. System calls.Missing: V6 | Show results with:V6
  20. [20]
    [PDF] UNIX PROGRAMMER'S MANUAL - Minnie.tuhs.org
    Jun 11, 1974 · From C, the external variable errno is set to the error number. Errno is not cleared on succesful calls, so it should be tested only after ...
  21. [21]
    [PDF] IEEE standard portable operating system interface for computer ...
    IEEE Std 1003.1-1988 is the first of a group of proposed standards known col¬ loquially, and collectively, as POSIXt. The other POSIX standards are described in ...
  22. [22]
    errno
    ### Summary of errno Usage, Access, and Notes
  23. [23]
    strerror
    The strerror() function shall map the error number in errnum to a locale-dependent error message string and shall return a pointer to it.
  24. [24]
    perror
    ### Summary of perror, errno, and s
  25. [25]
    strerror(3) - Linux manual page - man7.org
    The strerror() function returns a pointer to a string that describes the error code passed in the argument errnum.<|control11|><|separator|>
  26. [26]
    freeaddrinfo
    ### Summary of getaddrinfo from https://pubs.opengroup.org/onlinepubs/9699919799/functions/getaddrinfo.html
  27. [27]
    errno.h source code [include/errno.h] - Codebrowser
    /* The error code set by various library functions. */ · extern int * __errno_location (void) __THROW __attribute_const__; · # define errno (*__errno_location ()).
  28. [28]