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

📄 nice.html

📁 unix 下的C开发手册,还用详细的例程。
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>nice</title></head><body bgcolor=white><center><font size=2>The Single UNIX &reg; Specification, Version 2<br>Copyright &copy; 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_007_892">&nbsp;</a>NAME</h4><blockquote>nice - change nice value of a process</blockquote><h4><a name = "tag_000_007_893">&nbsp;</a>SYNOPSIS</h4><blockquote><pre><code>#include &lt;<a href="unistd.h.html">unistd.h</a>&gt;int nice(int <i>incr</i>);</code></pre></blockquote><h4><a name = "tag_000_007_894">&nbsp;</a>DESCRIPTION</h4><blockquote>The<i>nice()</i>function adds the value of<i>incr</i>to the nice value of the calling process.  A process' nice value is anon-negative number for which a more positive value results inless favourable scheduling.<p>A maximum nice value of 2 * {NZERO} -1 and a minimum nice value of 0are imposed by the system.Requests for values above or below these limits result in the nice valuebeing set to the corresponding limit. Only a process with appropriateprivileges can lower the nice value.<p>Calling the<i>nice()</i>function has no effect on the priority of processes or threadswith policy SCHED_FIFO or SCHED_RR.The effect on processes or threads with other scheduling policies isimplementation-dependent.<p>The nice value set with<i>nice()</i>is applied to the process.If the process is multi-threaded, the nice value affects allsystem scope threads in the process.</blockquote><h4><a name = "tag_000_007_895">&nbsp;</a>RETURN VALUE</h4><blockquote>Upon successful completion,<i>nice()</i>returns the new nice value minus {NZERO}.Otherwise, -1 is returned,the process' nice value is not changed, and<i>errno</i>is set to indicate the error.</blockquote><h4><a name = "tag_000_007_896">&nbsp;</a>ERRORS</h4><blockquote>The<i>nice()</i>function will fail if:<dl compact><dt>[EPERM]<dd>The<i>incr</i>argument is negative and thecalling process does not have appropriate privileges.</dl></blockquote><h4><a name = "tag_000_007_897">&nbsp;</a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_898">&nbsp;</a>APPLICATION USAGE</h4><blockquote>As -1 is apermissible return value in a successful situation, an applicationwishing to check for error situations should set<i>errno</i>to 0, then call<i>nice()</i>,and if it returns -1, check to see if<i>errno</i>is non-zero.</blockquote><h4><a name = "tag_000_007_899">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_900">&nbsp;</a>SEE ALSO</h4><blockquote><i><a href="limits.h.html">&lt;limits.h&gt;</a></i>,<i><a href="unistd.h.html">&lt;unistd.h&gt;</a></i>.</blockquote><h4>DERIVATION</h4><blockquote>Derived from Issue 1 of the SVID.</blockquote><hr size=2 noshade><center><font size=2>UNIX &reg; is a registered Trademark of The Open Group.<br>Copyright &copy; 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 + -