Your Browser is not longer supported
Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...
{{viewport.spaceProperty.prod}}
errno - variable for error return values
&pagelevel(4)&pagelevel
Syntax
#include <errno.h>
Description errno
is used by many functions to return error values. Programs obtain the definition of
| errno by the inclusion of the errno .h header. errno is set to an error number of type int (see errno.h and section “Error handling”). The value of errno is 0 at program startup, but it is never set to 0 to indicate an error by any function described in this manual. The value of errno will be defined only after a function call (see the "Errors" section for each function) and may be modified by a subsequent function call. A program that uses errno for error checking should therefore set it to 0 before a function call and subsequently inspect it before a new function call. |
Notes | errno should not be declared in the source code; however, existing source code need not be modified. A mapping between the numeric values and symbolic names of the error numbers is not guaranteed. Correct behavior is guaranteed only when using the symbolic constant names. Furthermore, the mapping of error conditions to errno values is guaranteed only for the cases required by X/Open. |
See also | perror() , strerror() , errno.h , section “Error handling”. |