#20189 [Asn->Csd]: PCNTL docs need updating to reflect 4.3.0 behavior

From: Date: Wed, 25 Feb 2004 07:00:36 +0000
Subject: #20189 [Asn->Csd]: PCNTL docs need updating to reflect 4.3.0 behavior
References: 1  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969359215@lists.php.net to get a copy of this message
ID: 20189 Updated by: irchtml@php.net Reported By: luca dot mariano at email dot it -Status: Assigned +Status: Closed Bug Type: Documentation problem Operating System: all PHP Version: 4.3.0 Assigned To: jason New Comment: Status -> Closed, per philip@php.net "...which closes this bug..." Previous Comments: ------------------------------------------------------------------------ [2003-01-23 17:07:33] philip@php.net Granted this was assigned to Jason, I added some documenation on this fact which closes this bug but I'm rewriting the summary as all the pcntl docs need updating. The following changes took place. http://cvs.php.net/cvs.php/phpdoc/en/reference/pcntl/reference.xml http://cvs.php.net/cvs.php/phpdoc/en/reference/pcntl/functions/pcntl-signal.xml You will see similarities between the changes and Jasons email :) Note I added "declare(ticks = 1)" in a couple examples. I believe Jason will eventually rewrite these but at least they should work now. ------------------------------------------------------------------------ [2002-10-31 08:17:45] edink@php.net There has been (udocumented) change to pcntl extension. Take a look at http://www.zend.com/lists/php-dev/200208/msg00937.html Changing to documentation problem and assigning to Jason. ------------------------------------------------------------------------ [2002-10-31 07:09:01] luca dot mariano at email dot it I'm currently working with PHP-CLI in order to write a comprensive multithread server framework, using the following PHP modules: -PCNTL (for process forking) -SOCKETS (for managing of sockets...) -SYSVSEM (semaphores to syncronyze threads) -SYSVSHM (for sharing data between threads) -XMLRPC (the best object broking for me) I noticed a strange behaviour of my apps when i use the PHP4.3 executable; the following test script does not work under 4.3, while it works under 4.2. <?php define (PULL_TIME,"1"); //event check frequency (secs) function usr1_handle($signal){ if ($signal==SIGUSR1) print time() . "-Received signal!\n"; } print "Server starting at " . time() . " ...\n"; $pid=pcntl_fork(); if ($pid==0) { // this is the child pcntl_signal(SIGUSR1, "usr1_handle"); sleep(5); $i = 0; while(true) {sleep(1);} } else { //this is the parent sleep(5); while(true) { posix_kill($pid,SIGUSR1); sleep(PULL_TIME); } } ?> No backtrace avaible, PHP does not crash, simply do nothing. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=20189&edit=1

« previous php.doc (#969359215) next »