reference/exec/functions/proc-nice.xml
4ecb2c1b4ba1b51c5e9678a7908e001df9bc92f5
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xml:id='function.proc-nice' xmlns="http://docbook.org/ns/docbook">
3
+
<refentry xml:id="function.proc-nice" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>proc_nice</refname>
6
6
<refpurpose>Change the priority of the current process</refpurpose>
...
...
@@ -10,13 +10,13 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>bool</type><methodname>proc_nice</methodname>
13
-
<methodparam><type>int</type><parameter>increment</parameter></methodparam>
13
+
<methodparam><type>int</type><parameter>priority</parameter></methodparam>
14
14
</methodsynopsis>
15
15
<para>
16
16
<function>proc_nice</function> changes the priority of the current
17
-
process by the amount specified in <parameter>increment</parameter>. A
18
-
positive <parameter>increment</parameter> will lower the priority of the
19
-
current process, whereas a negative <parameter>increment</parameter>
17
+
process by the amount specified in <parameter>priority</parameter>. A
18
+
positive <parameter>priority</parameter> will lower the priority of the
19
+
current process, whereas a negative <parameter>priority</parameter>
20
20
will raise the priority.
21
21
</para>
22
22
<para>
...
...
@@ -30,18 +30,18 @@
30
30
<para>
31
31
<variablelist>
32
32
<varlistentry>
33
-
<term><parameter>increment</parameter></term>
33
+
<term><parameter>priority</parameter></term>
34
34
<listitem>
35
35
<para>
36
36
The new priority value, the value of this may differ on platforms.
37
37
</para>
38
38
<para>
39
39
On Unix, a low value, such as <literal>-20</literal> means high priority
40
-
wheras a positive value have a lower priority.
40
+
whereas positive values have a lower priority.
41
41
</para>
42
42
<para>
43
-
For Windows the <parameter>increment</parameter> parameter have the
44
-
following meanings:
43
+
For Windows the <parameter>priority</parameter> parameter has the
44
+
following meaning:
45
45
</para>
46
46
<informaltable>
47
47
<tgroup cols="3">
...
...
@@ -55,32 +55,32 @@
55
55
<row>
56
56
<entry valign="top">High priority</entry>
57
57
<entry valign="top">
58
-
<parameter>increment</parameter> <literal>&lt; -9</literal>
58
+
<parameter>priority</parameter> <literal>&lt; -9</literal>
59
59
</entry>
60
60
</row>
61
61
<row>
62
62
<entry valign="top">Above normal priority</entry>
63
63
<entry valign="top">
64
-
<parameter>increment</parameter> <literal>&lt; -4</literal>
64
+
<parameter>priority</parameter> <literal>&lt; -4</literal>
65
65
</entry>
66
66
</row>
67
67
<row>
68
68
<entry valign="top">Normal priority</entry>
69
69
<entry valign="top">
70
-
<parameter>increment</parameter> <literal>&lt; 5</literal> &amp;
71
-
<parameter>increment</parameter> <literal>&gt; -5</literal>
70
+
<parameter>priority</parameter> <literal>&lt; 5</literal> &amp;
71
+
<parameter>priority</parameter> <literal>&gt; -5</literal>
72
72
</entry>
73
73
</row>
74
74
<row>
75
75
<entry valign="top">Below normal priority</entry>
76
76
<entry valign="top">
77
-
<parameter>increment</parameter> <literal>&gt; 5</literal>
77
+
<parameter>priority</parameter> <literal>&gt; 5</literal>
78
78
</entry>
79
79
</row>
80
80
<row>
81
81
<entry valign="top">Idle priority</entry>
82
82
<entry valign="top">
83
-
<parameter>increment</parameter> <literal>&gt; 9</literal>
83
+
<parameter>priority</parameter> <literal>&gt; 9</literal>
84
84
</entry>
85
85
</row>
86
86
</tbody>
...
...
@@ -101,24 +101,6 @@
101
101
</para>
102
102
</refsect1>
103
103

104
-
<refsect1 role="examples">
105
-
&reftitle.examples;
106
-
<para>
107
-
<example>
108
-
<title>Using <function>proc_nice</function> to set the process priority to high</title>
109
-
<programlisting role="php">
110
-
<![CDATA[
111
-
<?php
112
-
// Highest priority
113
-
proc_nice(-20);
114
-
?>
115
-
]]>
116
-
</programlisting>
117
-
</example>
118
-
</para>
119
-

120
-
</refsect1>
121
-

122
104
<refsect1 role="changelog">
123
105
&reftitle.changelog;
124
106
<para>
...
...
@@ -143,6 +125,24 @@ proc_nice(-20);
143
125
</para>
144
126
</refsect1>
145
127

128
+
<refsect1 role="examples">
129
+
&reftitle.examples;
130
+
<para>
131
+
<example>
132
+
<title>Using <function>proc_nice</function> to set the process priority to high</title>
133
+
<programlisting role="php">
134
+
<![CDATA[
135
+
<?php
136
+
// Highest priority
137
+
proc_nice(-20);
138
+
?>
139
+
]]>
140
+
</programlisting>
141
+
</example>
142
+
</para>
143
+

144
+
</refsect1>
145
+

146
146
<refsect1 role="notes">
147
147
&reftitle.notes;
148
148
<note>
...
...
@@ -156,13 +156,19 @@ proc_nice(-20);
156
156
<note>
157
157
<title>Windows only</title>
158
158
<para>
159
-
<function>proc_nice</function> will change the <emphasis>current</emphasis> process
159
+
<function>proc_nice</function> will change the current <emphasis>process</emphasis>
160
160
priority, even if PHP was compiled using thread safety.
161
161
</para>
162
162
</note>
163
163
</refsect1>
164
-
</refentry>
165
164

165
+
<refsect1 role="seealso">
166
+
&reftitle.seealso;
167
+
<simplelist>
168
+
<member><function>pcntl_setpriority</function></member>
169
+
</simplelist>
170
+
</refsect1>
171
+
</refentry>
166
172
<!-- Keep this comment at the end of the file
167
173
Local variables:
168
174
mode: sgml
169
175