irchtml Wed Feb 25 12:02:54 2004 EDT
Modified files: /phpdoc/en/reference/pcntl/functions pcntl-wait.xml Log: added info about wait3 http://cvs.php.net/diff.php/phpdoc/en/reference/pcntl/functions/pcntl-wait.xml?r1=1.2&r2=1.3&ty=u Index: phpdoc/en/reference/pcntl/functions/pcntl-wait.xml diff -u phpdoc/en/reference/pcntl/functions/pcntl-wait.xml:1.2 phpdoc/en/reference/pcntl/functions/pcntl-wait.xml:1.3 --- phpdoc/en/reference/pcntl/functions/pcntl-wait.xml:1.2 Wed Feb 25 11:42:00 2004 +++ phpdoc/en/reference/pcntl/functions/pcntl-wait.xml Wed Feb 25 12:02:53 2004 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <refentry id='function.pcntl-wait'> <refnamediv> <refname>pcntl_wait</refname> @@ -12,6 +12,7 @@ <methodsynopsis> <type>int</type><methodname>pcntl_wait</methodname> <methodparam><type>int</type><parameter>&status</parameter></methodparam> + <methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam> </methodsynopsis> <para> The wait function suspends execution of the current process until a @@ -23,8 +24,38 @@ specific details as to how wait works on your system. </para> <para> - <function>pcntl_wait</function> returns the process ID of the child which - exited. + <function>pcntl_waitpid</function> returns the process ID of the + child which exited, -1 on error or zero if WNOHANG was provided as an + option (on wait3-available systems) and no child was available. + </para> + <para> + If wait3 is available on your system (mostly BSD-style systems), you can + provide the optional <parameter>options</parameter> parameter. If this + parameter is not provided, wait will be used for the system call. If + wait3 is not available, providing a value for <parameter>options + </parameter> will have no effect. The value of <parameter>options + </parameter> is the value of zero or more of the following two constants + <literal>OR</literal>'ed together: + <table> + <title>Possible values for <parameter>options</parameter> if wait3 is available</title> + <tgroup cols="2"> + <tbody> + <row> + <entry><literal>WNOHANG</literal></entry> + <entry> + Return immediately if no child has exited. + </entry> + </row> + <row> + <entry><literal>WUNTRACED</literal></entry> + <entry> + Return for children which are stopped, and whose status has + not been reported. + </entry> + </row> + </tbody> + </tgroup> + </table> </para> <para> <function>pcntl_wait</function> will store status information