Updated the sleep() manual page to reflect the new Windows behaviour by

reintegrating some of the old return values text, adding a specific note based
on how SleepEx() is documented to behave on Windows, and adding a Changelog
section to document the pre-5.3.4 behaviour.


git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@305811 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Adam Harvey 2010-11-29 03:21:50 +00:00
parent c870a589e3
commit 6ef46c971e

View file

@ -37,16 +37,15 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
On all platforms, <function>sleep</function> returns &false; if the
<parameter>seconds</parameter> parameter is invalid.
Returns zero on success, or &false; on error.
</para>
<para>
On Windows, provided the aforementioned <parameter>seconds</parameter>
parameter is valid, <function>sleep</function> always returns &null;.
</para>
<para>
On other platforms, <function>sleep</function> returns zero on success, or
the number of seconds left to sleep if interrupted by a signal.
If the call was interrupted by a signal, <function>sleep</function> returns
a non-zero value. On Windows, this value will always be
<literal>192</literal> (the value of the
<constant>WAIT_IO_COMPLETION</constant> constant within the Windows API).
On other platforms, the return value will be the number of seconds left to
sleep.
</para>
</refsect1>
@ -58,6 +57,32 @@
</para>
</refsect1>
<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>5.3.4</entry>
<entry>
Before PHP 5.3.4, on Windows, <function>sleep</function> always
returns &null; when sleep has occurred, regardless of whether the
sleep was interrupted or not.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>