philip Thu Jan 23 17:59:07 2003 EDT Modified files: /phpdoc/en/reference/pcntl reference.xml Log: Added some 4.3.0 changes to the docs, see bug #20189. This is information out of an email to php-dev from Jason Greene on the subject. Index: phpdoc/en/reference/pcntl/reference.xml diff -u phpdoc/en/reference/pcntl/reference.xml:1.5 phpdoc/en/reference/pcntl/reference.xml:1.6 --- phpdoc/en/reference/pcntl/reference.xml:1.5 Sun Dec 1 12:10:16 2002 +++ phpdoc/en/reference/pcntl/reference.xml Thu Jan 23 17:59:07 2003 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> +<!-- $Revision: 1.6 $ --> <reference id="ref.pcntl"> <title>Process Control Functions</title> <titleabbrev>PCNTL</titleabbrev> @@ -21,8 +21,26 @@ systems documentation including fork(2), waitpid(2) and signal(2) or a comprehensive reference such as Advanced Programming in the UNIX Environment by W. Richard Stevens (Addison-Wesley). - </para> - ¬e.no-windows.extension; + </para> + <para> + PCNTL now uses ticks as the signal handle callback mechanism, which is + much faster than the previous mechanism. This change follows the same + semantics as using "user ticks". You use the <function>declare</function> + statement to specify the locations in your program where callbacks are + allowed to occur. This allows you to minimize the overhead of handling + asynchronous events. In the past, compiling PHP with pcntl enabled would + always incur this overhead, whether or not your script actually used + pcntl. + </para> + <para> + There is one adjustment that all pcntl scripts prior to PHP 4.3.0 must + make for them to work which is to either to use + <function>declare</function> on a section where you wish to allow + callbacks or to just enable it across the entire script using + the new global syntax of <function>declare</function>. + </para> + + ¬e.no-windows.extension; </section> <section id="pcntl.requirements"> @@ -54,6 +72,7 @@ <programlisting role="php"> <![CDATA[ <?php +declare(ticks=1); $pid = pcntl_fork(); if ($pid == -1) {
-- PHP Documentation Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php