⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uname.html

📁 posix标准英文,html格式
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta name="generator" content="HTML Tidy, see www.w3.org"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 --><!-- Copyright (c) 2001-2004 IEEE and The Open Group, All Rights Reserved --><title>uname</title></head><body bgcolor="white"><basefont size="3"> <a name="uname"></a> <a name="tag_03_799"></a><!-- uname --> <!--header start--><center><font size="2">The Open Group Base Specifications Issue 6<br>IEEE Std 1003.1, 2004 Edition<br>Copyright &copy; 2001-2004 The IEEE and The Open Group, All Rights reserved.</font></center><!--header end--><hr size="2" noshade><h4><a name="tag_03_799_01"></a>NAME</h4><blockquote>uname - get the name of the current system</blockquote><h4><a name="tag_03_799_02"></a>SYNOPSIS</h4><blockquote class="synopsis"><p><code><tt>#include &lt;<a href="../basedefs/sys/utsname.h.html">sys/utsname.h</a>&gt;<br><br> int uname(struct utsname *</tt><i>name</i><tt>);<br></tt></code></p></blockquote><h4><a name="tag_03_799_03"></a>DESCRIPTION</h4><blockquote><p>The <i>uname</i>() function shall store information identifying the current system in the structure pointed to by<i>name</i>.</p><p>The <i>uname</i>() function uses the <b>utsname</b> structure defined in <a href="../basedefs/sys/utsname.h.html"><i>&lt;sys/utsname.h&gt;</i></a>.</p><p>The <i>uname</i>() function shall return a string naming the current system in the character array <i>sysname</i>. Similarly,<i>nodename</i> shall contain the name of this node within an implementation-defined communications network. The arrays<i>release</i> and <i>version</i> shall further identify the operating system. The array <i>machine</i> shall contain a name thatidentifies the hardware that the system is running on.</p><p>The format of each member is implementation-defined.</p></blockquote><h4><a name="tag_03_799_04"></a>RETURN VALUE</h4><blockquote><p>Upon successful completion, a non-negative value shall be returned. Otherwise, -1 shall be returned and <i>errno</i> set toindicate the error.</p></blockquote><h4><a name="tag_03_799_05"></a>ERRORS</h4><blockquote><p>No errors are defined.</p></blockquote><hr><div class="box"><em>The following sections are informative.</em></div><h4><a name="tag_03_799_06"></a>EXAMPLES</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_03_799_07"></a>APPLICATION USAGE</h4><blockquote><p>The inclusion of the <i>nodename</i> member in this structure does not imply that it is sufficient information for interfacingto communications networks.</p></blockquote><h4><a name="tag_03_799_08"></a>RATIONALE</h4><blockquote><p>The values of the structure members are not constrained to have any relation to the version of this volume ofIEEE&nbsp;Std&nbsp;1003.1-2001 implemented in the operating system. An application should instead depend on _POSIX_VERSION andrelated constants defined in <a href="../basedefs/unistd.h.html"><i>&lt;unistd.h&gt;</i></a>.</p><p>This volume of IEEE&nbsp;Std&nbsp;1003.1-2001 does not define the sizes of the members of the structure and permits them to beof different sizes, although most implementations define them all to be the same size: eight bytes plus one byte for the stringterminator. That size for <i>nodename</i> is not enough for use with many networks.</p><p>The <i>uname</i>() function originated in System III, System V, and related implementations, and it does not exist in Version 7or 4.3 BSD. The values it returns are set at system compile time in those historical implementations.</p><p>4.3 BSD has <a href="../functions/gethostname.html"><i>gethostname</i>()</a> and <a href="../functions/gethostid.html"><i>gethostid</i>()</a>, which return a symbolic name and a numeric value, respectively. There arerelated <i>sethostname</i>() and <i>sethostid</i>() functions that are used to set the values the other two functions return. Theformer functions are included in this specification, the latter are not.</p></blockquote><h4><a name="tag_03_799_09"></a>FUTURE DIRECTIONS</h4><blockquote><p>None.</p></blockquote><h4><a name="tag_03_799_10"></a>SEE ALSO</h4><blockquote><p>The Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/sys/utsname.h.html"><i>&lt;sys/utsname.h&gt;</i></a></p></blockquote><h4><a name="tag_03_799_11"></a>CHANGE HISTORY</h4><blockquote><p>First released in Issue 1. Derived from Issue 1 of the SVID.</p></blockquote><div class="box"><em>End of informative text.</em></div><hr size="2" noshade><center><font size="2"><!--footer start-->UNIX &reg; is a registered Trademark of The Open Group.<br>POSIX &reg; is a registered Trademark of The IEEE.<br>[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>]</font></center><!--footer end--><hr size="2" noshade></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -