didou Sun Feb 4 02:46:43 2007 UTC
Modified files: /phpdoc/en/reference/pcntl/functions pcntl-alarm.xml pcntl-exec.xml pcntl-fork.xml pcntl-getpriority.xml pcntl-setpriority.xml pcntl-signal.xml pcntl-wait.xml pcntl-waitpid.xml pcntl-wexitstatus.xml pcntl-wifexited.xml pcntl-wifsignaled.xml pcntl-wifstopped.xml pcntl-wstopsig.xml pcntl-wtermsig.xml Log: ref.pcntl: switch to new style
http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pcntl/functions/pcntl-alarm.xml?r1=1.3&r2=1.4&diff_format=u Index: phpdoc/en/reference/pcntl/functions/pcntl-alarm.xml diff -u phpdoc/en/reference/pcntl/functions/pcntl-alarm.xml:1.3 phpdoc/en/reference/pcntl/functions/pcntl-alarm.xml:1.4 --- phpdoc/en/reference/pcntl/functions/pcntl-alarm.xml:1.3 Sun Feb 4 02:46:17 2007 +++ phpdoc/en/reference/pcntl/functions/pcntl-alarm.xml Sun Feb 4 02:46:42 2007 @@ -1,29 +1,51 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> +<!-- $Revision: 1.4 $ --> <refentry id='function.pcntl-alarm'> <refnamediv> <refname>pcntl_alarm</refname> <refpurpose>Set an alarm clock for delivery of a signal</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>pcntl_alarm</methodname> <methodparam><type>int</type><parameter>seconds</parameter></methodparam> </methodsynopsis> <para> - The <function>pcntl_alarm</function> function creates a timer that will - send a <literal>SIGALRM</literal> signal to the process after - <parameter>seconds</parameter> seconds. If <parameter>seconds</parameter> - is zero, no new alarm is created. Any call to <function>pcntl_alarm</function> - will cancel any previously set alarm. + Creates a timer that will send a <constant>SIGALRM</constant> signal to + the process after the given number of seconds. + Any call to <function>pcntl_alarm</function> will cancel any previously + set alarm. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - <function>pcntl_alarm</function> will return the time in seconds that any - previously scheduled alarm had remaining before it was to be delivered, or - <literal>0</literal> if there was no previously scheduled alarm. + <variablelist> + <varlistentry> + <term><parameter>seconds</parameter></term> + <listitem> + <para> + The number of seconds to wait. If <parameter>seconds</parameter> is + zero, no new alarm is created. + </para> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns the time in seconds that any previously scheduled alarm had + remaining before it was to be delivered, or <literal>0</literal> if there + was no previously scheduled alarm. + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pcntl/functions/pcntl-exec.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/pcntl/functions/pcntl-exec.xml diff -u phpdoc/en/reference/pcntl/functions/pcntl-exec.xml:1.5 phpdoc/en/reference/pcntl/functions/pcntl-exec.xml:1.6 --- phpdoc/en/reference/pcntl/functions/pcntl-exec.xml:1.5 Sun Feb 4 02:46:17 2007 +++ phpdoc/en/reference/pcntl/functions/pcntl-exec.xml Sun Feb 4 02:46:42 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/pcntl.xml, last change in rev 1.9 --> +<!-- $Revision: 1.6 $ --> <refentry id='function.pcntl-exec'> <refnamediv> <refname>pcntl_exec</refname> <refpurpose>Executes specified program in current process space</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>void</type><methodname>pcntl_exec</methodname> <methodparam><type>string</type><parameter>path</parameter></methodparam> @@ -15,28 +15,56 @@ <methodparam choice="opt"><type>array</type><parameter>envs</parameter></methodparam> </methodsynopsis> <para> - <function>pcntl_exec</function> executes the program - <parameter>path</parameter> with arguments <parameter>args</parameter>. - <parameter>path</parameter> must be the path to a binary executable or a - script with a valid path pointing to an executable in the shebang ( - #!/usr/local/bin/perl for example) as the first line. See your system's - man execve(2) page for additional information. - </para> - <para> - <parameter>args</parameter> is an array of argument strings passed to the - program. + Executes the program with the given arguments. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - <parameter>envs</parameter> is an array of strings which are passed as - environment to the program. The array is in the format of name => value, - the key being the name of the environmental variable and the value being - the value of that variable. + <variablelist> + <varlistentry> + <term><parameter>path</parameter></term> + <listitem> + <para> + <parameter>path</parameter> must be the path to a binary executable or a + script with a valid path pointing to an executable in the shebang ( + #!/usr/local/bin/perl for example) as the first line. See your system's + man execve(2) page for additional information. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>args</parameter></term> + <listitem> + <para> + <parameter>args</parameter> is an array of argument strings passed to the + program. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>envs</parameter></term> + <listitem> + <para> + <parameter>envs</parameter> is an array of strings which are passed as + environment to the program. The array is in the format of name => value, + the key being the name of the environmental variable and the value being + the value of that variable. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - <function>pcntl_exec</function> returns &false; on error and does not - return on success. + Returns &false; on error and does not return on success. </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pcntl/functions/pcntl-fork.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/pcntl/functions/pcntl-fork.xml diff -u phpdoc/en/reference/pcntl/functions/pcntl-fork.xml:1.6 phpdoc/en/reference/pcntl/functions/pcntl-fork.xml:1.7 --- phpdoc/en/reference/pcntl/functions/pcntl-fork.xml:1.6 Sun Feb 4 02:46:17 2007 +++ phpdoc/en/reference/pcntl/functions/pcntl-fork.xml Sun Feb 4 02:46:42 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> -<!-- splitted from ./en/functions/pcntl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.7 $ --> <refentry id="function.pcntl-fork"> <refnamediv> <refname>pcntl_fork</refname> <refpurpose>Forks the currently running process</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>pcntl_fork</methodname> <void/> @@ -18,6 +18,10 @@ PPID. Please see your system's fork(2) man page for specific details as to how fork works on your system. </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> On success, the PID of the child process is returned in the parent's thread of execution, and a 0 is returned in the child's @@ -25,9 +29,14 @@ parent's context, no child process will be created, and a PHP error is raised. </para> - <example> - <title><function>pcntl_fork</function> example</title> - <programlisting role="php"> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>pcntl_fork</function> example</title> + <programlisting role="php"> <![CDATA[ <?php @@ -43,13 +52,21 @@ ?> ]]> - </programlisting> - </example> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>pcntl_waitpid</function> and - <function>pcntl_signal</function>. + <simplelist> + <member><function>pcntl_waitpid</function></member> + <member><function>pcntl_signal</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pcntl/functions/pcntl-getpriority.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/pcntl/functions/pcntl-getpriority.xml diff -u phpdoc/en/reference/pcntl/functions/pcntl-getpriority.xml:1.4 phpdoc/en/reference/pcntl/functions/pcntl-getpriority.xml:1.5 --- phpdoc/en/reference/pcntl/functions/pcntl-getpriority.xml:1.4 Sun Feb 4 02:46:17 2007 +++ phpdoc/en/reference/pcntl/functions/pcntl-getpriority.xml Sun Feb 4 02:46:42 2007 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id='function.pcntl-getpriority'> <refnamediv> <refname>pcntl_getpriority</refname> <refpurpose>Get the priority of any process</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>pcntl_getpriority</methodname> <methodparam choice="opt"><type>int</type><parameter>pid</parameter></methodparam> @@ -14,24 +15,47 @@ </methodsynopsis> <para> <function>pcntl_getpriority</function> gets the priority of - <parameter>pid</parameter>. If <parameter>pid</parameter> is not - specified, the pid of the current process is used. Because priority - levels can differ between system types and kernel versions, please see - your system's getpriority(2) man page for specific details. + <parameter>pid</parameter>. Because priority levels can differ between + system types and kernel versions, please see your system's getpriority(2) + man page for specific details. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>pid</parameter></term> + <listitem> + <para> + If not specified, the pid of the current process is used. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>process_identifier</parameter></term> + <listitem> + <para> + One of <constant>PRIO_PGRP</constant>, <constant>PRIO_USER</constant> + or <constant>PRIO_PROCESS</constant>. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> <function>pcntl_getpriority</function> returns the priority of the process or &false; on error. A lower numerical value causes more favorable scheduling. </para> - <para> - <parameter>process_identifier</parameter> is one of - <constant>PRIO_PGRP</constant>, - <constant>PRIO_USER</constant> or - <constant>PRIO_PROCESS</constant>. - </para> &return.falseproblem; </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pcntl/functions/pcntl-setpriority.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/pcntl/functions/pcntl-setpriority.xml diff -u phpdoc/en/reference/pcntl/functions/pcntl-setpriority.xml:1.4 phpdoc/en/reference/pcntl/functions/pcntl-setpriority.xml:1.5 --- phpdoc/en/reference/pcntl/functions/pcntl-setpriority.xml:1.4 Sun Feb 4 02:46:17 2007 +++ phpdoc/en/reference/pcntl/functions/pcntl-setpriority.xml Sun Feb 4 02:46:42 2007 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> +<!-- $Revision: 1.5 $ --> <refentry id='function.pcntl-setpriority'> <refnamediv> <refname>pcntl_setpriority</refname> <refpurpose>Change the priority of any process</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>pcntl_setpriority</methodname> <methodparam><type>int</type><parameter>priority</parameter></methodparam> @@ -15,28 +16,55 @@ </methodsynopsis> <para> <function>pcntl_setpriority</function> sets the priority of - <parameter>pid</parameter> to <parameter>priority</parameter>. If - <parameter>pid</parameter> is not specified, the pid of the current - process is used. - </para> - <para> - <parameter>priority</parameter> is generally a value in the range - <literal>-20</literal> to <literal>20</literal>. The default priority - is <literal>0</literal> while a lower numerical value causes more - favorable scheduling. Because priority levels can differ between - system types and kernel versions, please see your system's setpriority(2) - man page for specific details. + <parameter>pid</parameter>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - <parameter>process_identifier</parameter> is one of - <constant>PRIO_PGRP</constant>, - <constant>PRIO_USER</constant> or - <constant>PRIO_PROCESS</constant>. + <variablelist> + <varlistentry> + <term><parameter>priority</parameter></term> + <listitem> + <para> + <parameter>priority</parameter> is generally a value in the range + <literal>-20</literal> to <literal>20</literal>. The default priority + is <literal>0</literal> while a lower numerical value causes more + favorable scheduling. Because priority levels can differ between + system types and kernel versions, please see your system's setpriority(2) + man page for specific details. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>pid</parameter></term> + <listitem> + <para> + If not specified, the pid of the current process is used. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>process_identifier</parameter></term> + <listitem> + <para> + One of <constant>PRIO_PGRP</constant>, <constant>PRIO_USER</constant> + or <constant>PRIO_PROCESS</constant>. + </para> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pcntl/functions/pcntl-signal.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/pcntl/functions/pcntl-signal.xml diff -u phpdoc/en/reference/pcntl/functions/pcntl-signal.xml:1.9 phpdoc/en/reference/pcntl/functions/pcntl-signal.xml:1.10 --- phpdoc/en/reference/pcntl/functions/pcntl-signal.xml:1.9 Sun Feb 4 02:46:17 2007 +++ phpdoc/en/reference/pcntl/functions/pcntl-signal.xml Sun Feb 4 02:46:42 2007 @@ -1,49 +1,124 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> -<!-- splitted from ./en/functions/pcntl.xml, last change in rev 1.2 --> +<!-- $Revision: 1.10 $ --> <refentry id="function.pcntl-signal"> <refnamediv> <refname>pcntl_signal</refname> <refpurpose>Installs a signal handler</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>pcntl_signal</methodname> <methodparam><type>int</type><parameter>signo</parameter></methodparam> - <methodparam><type>callback</type><parameter>handle</parameter></methodparam> + <methodparam><type>callback</type><parameter>handler</parameter></methodparam> <methodparam choice="opt"><type>bool</type><parameter>restart_syscalls</parameter></methodparam> </methodsynopsis> <para> The <function>pcntl_signal</function> function installs a new - signal handler for the signal indicated by - <parameter>signo</parameter>. The signal handler is set to - <parameter>handler</parameter> which may be the name of a user - created function, or either of the two global constants SIG_IGN - or SIG_DFL. The optional <parameter>restart_syscalls</parameter> - specifies whether system call restarting should be used when this - signal arrives and defaults to &true;. + signal handler for the signal indicated by <parameter>signo</parameter>. </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>signo</parameter></term> + <listitem> + <para> + The signal number. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>handler</parameter></term> + <listitem> + <para> + The signal handler which may be the name of a user created function, + or method, or either of the two global constants + <constant>SIG_IGN</constant> or <constant>SIG_DFL</constant>. + </para> + <note> + <para> + Note that when you set a handler to an object method, that object's + reference count is increased which makes it persist until you either + change the handler to something else, or your script ends. + </para> + </note> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>restart_syscalls</parameter></term> + <listitem> + <para> + Specifies whether system call restarting should be used when this + signal arrives and defaults to &true;. + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> &return.success; </para> - <note> - <para> - The optional <parameter>restart_syscalls</parameter> parameter became - available in PHP 4.3.0. - </para> - </note> - <note> - <para> - The ability to use an object method as a callback became available in - PHP 4.3.0. Note that when you set a handler to an object method, that - object's reference count is increased which makes it persist until you - either change the handler to something else, or your script ends. - </para> - </note> - <example> - <title><function>pcntl_signal</function> example</title> - <programlisting role="php"> + </refsect1> + + <refsect1 role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>4.3.0</entry> + <entry> + The <parameter>restart_syscalls</parameter> parameter was added. + </entry> + </row> + <row> + <entry>4.3.0</entry> + <entry> + The ability to use an object method as a callback became available. + </entry> + </row> + <row> + <entry>4.3.0</entry> + <entry> + As of PHP 4.3.0 PCNTL uses ticks as the signal handle callback + mechanism, which is much faster than the previous mechanism. This + change follows the same semantics as using + "<link linkend="control-structures.declare.ticks">user ticks</link>". + You must use the <link + linkend="control-structures.declare">declare()</link> statement to + specify the locations in your program where callbacks are allowed to + occur for the signal handler to function properly (as used in the + above example). + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title><function>pcntl_signal</function> example</title> + <programlisting role="php"> <![CDATA[ <?php // tick use required as of PHP 4.3.0 @@ -89,25 +164,21 @@ ?> ]]> - </programlisting> - </example> - <note> - <para> - As of PHP 4.3.0 PCNTL uses ticks as the signal handle callback mechanism, - which is much faster than the previous mechanism. This change follows the - same semantics as using - "<link linkend="control-structures.declare.ticks">user ticks</link>". You - must use the <link linkend="control-structures.declare">declare()</link> - statement to specify the locations in your program where callbacks are - allowed to occur for the signal handler to function properly (as used in - the above example). - </para> - </note> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>pcntl_fork</function> and - <function>pcntl_waitpid</function>. + <simplelist> + <member><function>pcntl_fork</function></member> + <member><function>pcntl_waitpid</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pcntl/functions/pcntl-wait.xml?r1=1.6&r2=1.7&diff_format=u Index: phpdoc/en/reference/pcntl/functions/pcntl-wait.xml diff -u phpdoc/en/reference/pcntl/functions/pcntl-wait.xml:1.6 phpdoc/en/reference/pcntl/functions/pcntl-wait.xml:1.7 --- phpdoc/en/reference/pcntl/functions/pcntl-wait.xml:1.6 Sun Feb 4 02:46:17 2007 +++ phpdoc/en/reference/pcntl/functions/pcntl-wait.xml Sun Feb 4 02:46:42 2007 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.6 $ --> +<!-- $Revision: 1.7 $ --> <refentry id='function.pcntl-wait'> <refnamediv> <refname>pcntl_wait</refname> <refpurpose>Waits on or returns the status of a forked child</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>pcntl_wait</methodname> <methodparam><type>int</type><parameter role="reference">status</parameter></methodparam> @@ -21,51 +22,6 @@ the child are freed. Please see your system's wait(2) man page for 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, -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 - in the <parameter>status</parameter> parameter which can be - evaluated using the following functions: - <function>pcntl_wifexited</function>, - <function>pcntl_wifstopped</function>, - <function>pcntl_wifsignaled</function>, - <function>pcntl_wexitstatus</function>, - <function>pcntl_wtermsig</function> and - <function>pcntl_wstopsig</function>. - </para> <note> <para> This function is equivalent to calling <function>pcntl_waitpid</function> @@ -73,18 +29,92 @@ <parameter>options</parameter>. </para> </note> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - See also <function>pcntl_fork</function>, - <function>pcntl_signal</function>, - <function>pcntl_wifexited</function>, - <function>pcntl_wifstopped</function>, - <function>pcntl_wifsignaled</function>, - <function>pcntl_wexitstatus</function>, - <function>pcntl_wtermsig</function>, - <function>pcntl_wstopsig</function> and - <function>pcntl_waitpid</function>. + <variablelist> + <varlistentry> + <term><parameter>status</parameter></term> + <listitem> + <para> + <function>pcntl_wait</function> will store status information + in the <parameter>status</parameter> parameter which can be + evaluated using the following functions: + <function>pcntl_wifexited</function>, + <function>pcntl_wifstopped</function>, + <function>pcntl_wifsignaled</function>, + <function>pcntl_wexitstatus</function>, + <function>pcntl_wtermsig</function> and + <function>pcntl_wstopsig</function>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>options</parameter></term> + <listitem> + <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></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> + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + <function>pcntl_wait</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> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>pcntl_fork</function></member> + <member><function>pcntl_signal</function></member> + <member><function>pcntl_wifexited</function></member> + <member><function>pcntl_wifstopped</function></member> + <member><function>pcntl_wifsignaled</function></member> + <member><function>pcntl_wexitstatus</function></member> + <member><function>pcntl_wtermsig</function></member> + <member><function>pcntl_wstopsig</function></member> + <member><function>pcntl_waitpid</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pcntl/functions/pcntl-waitpid.xml?r1=1.9&r2=1.10&diff_format=u Index: phpdoc/en/reference/pcntl/functions/pcntl-waitpid.xml diff -u phpdoc/en/reference/pcntl/functions/pcntl-waitpid.xml:1.9 phpdoc/en/reference/pcntl/functions/pcntl-waitpid.xml:1.10 --- phpdoc/en/reference/pcntl/functions/pcntl-waitpid.xml:1.9 Sun Feb 4 02:46:17 2007 +++ phpdoc/en/reference/pcntl/functions/pcntl-waitpid.xml Sun Feb 4 02:46:42 2007 @@ -1,12 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.9 $ --> +<!-- $Revision: 1.10 $ --> <refentry id="function.pcntl-waitpid"> <refnamediv> <refname>pcntl_waitpid</refname> <refpurpose>Waits on or returns the status of a forked child</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>pcntl_waitpid</methodname> <methodparam><type>int</type><parameter>pid</parameter></methodparam> @@ -14,114 +15,149 @@ <methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam> </methodsynopsis> <para> - The <function>pcntl_waitpid</function> function suspends execution - of the current process until a child as specified by the - <parameter>pid</parameter> argument has exited, or until a signal - is delivered whose action is to terminate the current process or - to call a signal handling function. If a child as requested by - <parameter>pid</parameter> has already exited by the time of the - call (a so-called "zombie" process), the function returns - immediately. Any system resources used by the child are - freed. Please see your system's waitpid(2) man page for specific - details as to how waitpid works on your system. + Suspends execution of the current process until a child as specified by + the <parameter>pid</parameter> argument has exited, or until a signal is + delivered whose action is to terminate the current process or to call a + signal handling function. </para> <para> - <function>pcntl_waitpid</function> returns the process ID of the - child which exited, -1 on error or zero if WNOHANG was used and no - child was available - </para> - <para> - The value of <parameter>pid</parameter> can be one of the following: - <table> - <title>possible values for <parameter>pid</parameter></title> - <tgroup cols="2"> - <tbody> - <row> - <entry><literal>< -1</literal></entry> - <entry> - wait for any child process whose process group ID is equal to - the absolute value of <parameter>pid</parameter>. - </entry> - </row> - <row> - <entry><literal>-1</literal></entry> - <entry> - wait for any child process; this is the same behaviour that - the wait function exhibits. - </entry> - </row> - <row> - <entry><literal>0</literal></entry> - <entry> - wait for any child process whose process group ID is equal to - that of the calling process. - </entry> - </row> - <row> - <entry><literal>> 0</literal></entry> - <entry> - wait for the child whose process ID is equal to the value of - <parameter>pid</parameter>. - </entry> - </row> - </tbody> - </tgroup> - </table> + If a child as requested by <parameter>pid</parameter> has already exited + by the time of the call (a so-called "zombie" process), the function + returns immediately. Any system resources used by the child are freed. + Please see your system's waitpid(2) man page for specific details as to + how waitpid works on your system. </para> - <note> - <para> - Specifying <literal>-1</literal> as the <parameter>pid</parameter> is - equivalent to the functionality <function>pcntl_wait</function> provides - (minus <parameter>options</parameter>). - </para> - </note> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - <function>pcntl_waitpid</function> will store status information - in the <parameter>status</parameter> parameter which can be - evaluated using the following functions: - <function>pcntl_wifexited</function>, - <function>pcntl_wifstopped</function>, - <function>pcntl_wifsignaled</function>, - <function>pcntl_wexitstatus</function>, - <function>pcntl_wtermsig</function> and - <function>pcntl_wstopsig</function>. + <variablelist> + <varlistentry> + <term><parameter>pid</parameter></term> + <listitem> + <para> + The value of <parameter>pid</parameter> can be one of the following: + <table> + <title>possible values for <parameter>pid</parameter></title> + <tgroup cols="2"> + <tbody> + <row> + <entry><literal>< -1</literal></entry> + <entry> + wait for any child process whose process group ID is equal to + the absolute value of <parameter>pid</parameter>. + </entry> + </row> + <row> + <entry><literal>-1</literal></entry> + <entry> + wait for any child process; this is the same behaviour that + the wait function exhibits. + </entry> + </row> + <row> + <entry><literal>0</literal></entry> + <entry> + wait for any child process whose process group ID is equal to + that of the calling process. + </entry> + </row> + <row> + <entry><literal>> 0</literal></entry> + <entry> + wait for the child whose process ID is equal to the value of + <parameter>pid</parameter>. + </entry> + </row> + </tbody> + </tgroup> + </table> + </para> + <note> + <para> + Specifying <literal>-1</literal> as the <parameter>pid</parameter> is + equivalent to the functionality <function>pcntl_wait</function> provides + (minus <parameter>options</parameter>). + </para> + </note> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>status</parameter></term> + <listitem> + <para> + <function>pcntl_waitpid</function> will store status information + in the <parameter>status</parameter> parameter which can be + evaluated using the following functions: + <function>pcntl_wifexited</function>, + <function>pcntl_wifstopped</function>, + <function>pcntl_wifsignaled</function>, + <function>pcntl_wexitstatus</function>, + <function>pcntl_wtermsig</function> and + <function>pcntl_wstopsig</function>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>options</parameter></term> + <listitem> + <para> + The value of <parameter>options</parameter> is the value of zero + or more of the following two global constants + <literal>OR</literal>'ed together: + <table> + <title>possible values for <parameter>options</parameter></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> + </listitem> + </varlistentry> + </variablelist> </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - The value of <parameter>options</parameter> is the value of zero - or more of the following two global constants - <literal>OR</literal>'ed together: - <table> - <title>possible values for <parameter>options</parameter></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> + <function>pcntl_waitpid</function> returns the process ID of the + child which exited, -1 on error or zero if WNOHANG was used and no + child was available </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; <para> - See also <function>pcntl_fork</function>, - <function>pcntl_signal</function>, - <function>pcntl_wifexited</function>, - <function>pcntl_wifstopped</function>, - <function>pcntl_wifsignaled</function>, - <function>pcntl_wexitstatus</function>, - <function>pcntl_wtermsig</function> and - <function>pcntl_wstopsig</function>. + <simplelist> + <member><function>pcntl_fork</function></member> + <member><function>pcntl_signal</function></member> + <member><function>pcntl_wifexited</function></member> + <member><function>pcntl_wifstopped</function></member> + <member><function>pcntl_wifsignaled</function></member> + <member><function>pcntl_wexitstatus</function></member> + <member><function>pcntl_wtermsig</function></member> + <member><function>pcntl_wstopsig</function></member> + </simplelist> </para> </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pcntl/functions/pcntl-wexitstatus.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/pcntl/functions/pcntl-wexitstatus.xml diff -u phpdoc/en/reference/pcntl/functions/pcntl-wexitstatus.xml:1.4 phpdoc/en/reference/pcntl/functions/pcntl-wexitstatus.xml:1.5 --- phpdoc/en/reference/pcntl/functions/pcntl-wexitstatus.xml:1.4 Sun Feb 4 02:46:17 2007 +++ phpdoc/en/reference/pcntl/functions/pcntl-wexitstatus.xml Sun Feb 4 02:46:43 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<!-- splitted from ./en/functions/pcntl.xml, last change in rev 1.2 --> +<!-- $Revision: 1.5 $ --> <refentry id="function.pcntl-wexitstatus"> <refnamediv> <refname>pcntl_wexitstatus</refname> <refpurpose>Returns the return code of a terminated child</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>pcntl_wexitstatus</methodname> <methodparam><type>int</type><parameter>status</parameter></methodparam> @@ -17,12 +17,39 @@ only useful if <function>pcntl_wifexited</function> returned &true;. </para> - &pcntl.parameter.status; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>status</parameter></term> + <listitem> + &pcntl.parameter.status; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - See also <function>pcntl_waitpid</function> and - <function>pcntl_wifexited</function>. + Returns the return code, as an integer. </para> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>pcntl_waitpid</function></member> + <member><function>pcntl_wifexited</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pcntl/functions/pcntl-wifexited.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/pcntl/functions/pcntl-wifexited.xml diff -u phpdoc/en/reference/pcntl/functions/pcntl-wifexited.xml:1.5 phpdoc/en/reference/pcntl/functions/pcntl-wifexited.xml:1.6 --- phpdoc/en/reference/pcntl/functions/pcntl-wifexited.xml:1.5 Sun Feb 4 02:46:17 2007 +++ phpdoc/en/reference/pcntl/functions/pcntl-wifexited.xml Sun Feb 4 02:46:43 2007 @@ -1,27 +1,54 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/pcntl.xml, last change in rev 1.2 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.pcntl-wifexited"> <refnamediv> <refname>pcntl_wifexited</refname> - <refpurpose>Returns &true; if status code represents a successful exit</refpurpose> + <refpurpose>Checks if status code represents a normal exit</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>pcntl_wifexited</methodname> <methodparam><type>int</type><parameter>status</parameter></methodparam> </methodsynopsis> <para> - Returns &true; if the child status code represents a successful - exit. + Checks wether the child status code represents a normal exit. </para> - &pcntl.parameter.status; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>status</parameter></term> + <listitem> + &pcntl.parameter.status; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - See also <function>pcntl_waitpid</function> and - <function>pcntl_wexitstatus</function>. + Returns &true; if the child status code represents a normal exit, &false; + otherwise. </para> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>pcntl_waitpid</function></member> + <member><function>pcntl_wexitstatus</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pcntl/functions/pcntl-wifsignaled.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/pcntl/functions/pcntl-wifsignaled.xml diff -u phpdoc/en/reference/pcntl/functions/pcntl-wifsignaled.xml:1.5 phpdoc/en/reference/pcntl/functions/pcntl-wifsignaled.xml:1.6 --- phpdoc/en/reference/pcntl/functions/pcntl-wifsignaled.xml:1.5 Sun Feb 4 02:46:17 2007 +++ phpdoc/en/reference/pcntl/functions/pcntl-wifsignaled.xml Sun Feb 4 02:46:43 2007 @@ -1,27 +1,55 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/pcntl.xml, last change in rev 1.2 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.pcntl-wifsignaled"> <refnamediv> <refname>pcntl_wifsignaled</refname> - <refpurpose>Returns &true; if status code represents a termination due to a signal</refpurpose> + <refpurpose>Checks wether the status code represents a termination due to a signal</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>pcntl_wifsignaled</methodname> <methodparam><type>int</type><parameter>status</parameter></methodparam> </methodsynopsis> <para> - Returns &true; if the child process exited because of a signal - which was not caught. + Checks wether the child process exited because of a signal which was not + caught. </para> - &pcntl.parameter.status; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>status</parameter></term> + <listitem> + &pcntl.parameter.status; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - See also <function>pcntl_waitpid</function> and - <function>pcntl_signal</function>. + Returns &true; if the child process exited because of a signal which was + not caught, &false; otherwise. </para> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>pcntl_waitpid</function></member> + <member><function>pcntl_signal</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pcntl/functions/pcntl-wifstopped.xml?r1=1.5&r2=1.6&diff_format=u Index: phpdoc/en/reference/pcntl/functions/pcntl-wifstopped.xml diff -u phpdoc/en/reference/pcntl/functions/pcntl-wifstopped.xml:1.5 phpdoc/en/reference/pcntl/functions/pcntl-wifstopped.xml:1.6 --- phpdoc/en/reference/pcntl/functions/pcntl-wifstopped.xml:1.5 Sun Feb 4 02:46:17 2007 +++ phpdoc/en/reference/pcntl/functions/pcntl-wifstopped.xml Sun Feb 4 02:46:43 2007 @@ -1,28 +1,56 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<!-- splitted from ./en/functions/pcntl.xml, last change in rev 1.2 --> +<!-- $Revision: 1.6 $ --> <refentry id="function.pcntl-wifstopped"> <refnamediv> <refname>pcntl_wifstopped</refname> - <refpurpose>Returns &true; if child process is currently stopped</refpurpose> + <refpurpose>Checks wether the child process is currently stopped</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>bool</type><methodname>pcntl_wifstopped</methodname> <methodparam><type>int</type><parameter>status</parameter></methodparam> </methodsynopsis> <para> - Returns &true; if the child process which caused the return is - currently stopped; this is only possible if the call to + Checks wether the child process which caused the return is currently + stopped; this is only possible if the call to <function>pcntl_waitpid</function> was done using the option <literal>WUNTRACED</literal>. </para> - &pcntl.parameter.status; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; <para> - See also <function>pcntl_waitpid</function>. + <variablelist> + <varlistentry> + <term><parameter>status</parameter></term> + <listitem> + &pcntl.parameter.status; + </listitem> + </varlistentry> + </variablelist> </para> </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + Returns &true; if the child process which caused the return is + currently stopped, &false; otherwise. + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>pcntl_waitpid</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pcntl/functions/pcntl-wstopsig.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/pcntl/functions/pcntl-wstopsig.xml diff -u phpdoc/en/reference/pcntl/functions/pcntl-wstopsig.xml:1.4 phpdoc/en/reference/pcntl/functions/pcntl-wstopsig.xml:1.5 --- phpdoc/en/reference/pcntl/functions/pcntl-wstopsig.xml:1.4 Sun Feb 4 02:46:17 2007 +++ phpdoc/en/reference/pcntl/functions/pcntl-wstopsig.xml Sun Feb 4 02:46:43 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<!-- splitted from ./en/functions/pcntl.xml, last change in rev 1.2 --> +<!-- $Revision: 1.5 $ --> <refentry id="function.pcntl-wstopsig"> <refnamediv> <refname>pcntl_wstopsig</refname> <refpurpose>Returns the signal which caused the child to stop</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>pcntl_wstopsig</methodname> <methodparam><type>int</type><parameter>status</parameter></methodparam> @@ -17,12 +17,39 @@ This function is only useful if <function>pcntl_wifstopped</function> returned &true;. </para> - &pcntl.parameter.status; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>status</parameter></term> + <listitem> + &pcntl.parameter.status; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - See also <function>pcntl_waitpid</function> and - <function>pcntl_wifstopped</function>. + Returns the signal number. </para> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>pcntl_waitpid</function></member> + <member><function>pcntl_wifstopped</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/pcntl/functions/pcntl-wtermsig.xml?r1=1.4&r2=1.5&diff_format=u Index: phpdoc/en/reference/pcntl/functions/pcntl-wtermsig.xml diff -u phpdoc/en/reference/pcntl/functions/pcntl-wtermsig.xml:1.4 phpdoc/en/reference/pcntl/functions/pcntl-wtermsig.xml:1.5 --- phpdoc/en/reference/pcntl/functions/pcntl-wtermsig.xml:1.4 Sun Feb 4 02:46:17 2007 +++ phpdoc/en/reference/pcntl/functions/pcntl-wtermsig.xml Sun Feb 4 02:46:43 2007 @@ -1,13 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<!-- splitted from ./en/functions/pcntl.xml, last change in rev 1.1 --> +<!-- $Revision: 1.5 $ --> <refentry id="function.pcntl-wtermsig"> <refnamediv> <refname>pcntl_wtermsig</refname> <refpurpose>Returns the signal which caused the child to terminate</refpurpose> </refnamediv> - <refsect1> - <title>Description</title> + + <refsect1 role="description"> + &reftitle.description; <methodsynopsis> <type>int</type><methodname>pcntl_wtermsig</methodname> <methodparam><type>int</type><parameter>status</parameter></methodparam> @@ -17,13 +17,40 @@ terminate. This function is only useful if <function>pcntl_wifsignaled</function> returned &true;. </para> - &pcntl.parameter.status; + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>status</parameter></term> + <listitem> + &pcntl.parameter.status; + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; <para> - See also <function>pcntl_waitpid</function>, - <function>pcntl_signal</function> and - <function>pcntl_wifsignaled</function>. + Returns the signal number, as an integer. </para> </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>pcntl_waitpid</function></member> + <member><function>pcntl_signal</function></member> + <member><function>pcntl_wifsignaled</function></member> + </simplelist> + </para> + </refsect1> + </refentry> <!-- Keep this comment at the end of the file