|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-10-31 08:17 UTC] edink@php.net
[2003-01-23 17:07 UTC] philip@php.net
[2004-02-25 02:00 UTC] irchtml@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 03:00:01 2025 UTC |
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.