📄 errno.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>errno</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_003_262"> </a>NAME</h4><blockquote>errno - XSI error return value</blockquote><h4><a name = "tag_000_003_263"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="errno.h.html">errno.h</a>></code></pre></blockquote><h4><a name = "tag_000_003_264"> </a>DESCRIPTION</h4><blockquote><p><i>errno</i>is used by many XSI functions to return error values.<p>Many functions provide an error number in<i>errno</i>which has type<b>int</b>and is defined in<i><a href="errno.h.html"><errno.h></a></i>.The value of<i>errno</i>will be defined only after a call to a function for which it is explicitlystated to be set and until it is changed by the next function call.The value of<i>errno</i>should only be examined when it is indicated to be valid by a function'sreturn value. Programs should obtain the definition of<i>errno</i>by the inclusion of<i><a href="errno.h.html"><errno.h></a></i>.The practice of defining<i>errno</i>in a program as<b>extern int</b><i>errno</i>is obsolescent. No function in this specification sets<i>errno</i>to 0 to indicate an error.<p>It is unspecified whether<i>errno</i>is a macro or an identifier declared withexternal linkage. If a macro definition is suppressed in order to access anactual object, or a program defines an identifier with the name <b>errno</b>,the behaviour is undefined.<p>Thesymbolic values stored in<i>errno</i>are documented in the ERRORS sections on all relevant pages.</blockquote><h4><a name = "tag_000_003_265"> </a>RETURN VALUE</h4><blockquote>None.</blockquote><h4><a name = "tag_000_003_266"> </a>ERRORS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_003_267"> </a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_003_268"> </a>APPLICATION USAGE</h4><blockquote>Previously both POSIX and X/Open documents were more restrictive than theISO C standard in that they required<i>errno</i>to be defined as an external variable, whereas the ISO C standard requiredonly that<i>errno</i>be defined as a modifiable <b>lvalue</b> with type<b>int</b>.<p>A program that uses<i>errno</i>for error checking should set it to 0 before a functioncall, then inspect it before a subsequent function call.</blockquote><h4><a name = "tag_000_003_269"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_003_270"> </a>SEE ALSO</h4><blockquote><i><a href="errno.h.html"><errno.h></a></i>,<a href="errors.html">errors</a>.</blockquote><h4>DERIVATION</h4><blockquote>Derived from Issue 1 of the SVID.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -