From:             [EMAIL PROTECTED]
Operating system: Linux RedHat 7.1
PHP version:      4.3.0-pre2
PHP Bug Type:     PCRE related
Bug description:  pcnt_signal does not work

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 bug report at http://bugs.php.net/?id=20189&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20189&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20189&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20189&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20189&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20189&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20189&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20189&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20189&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20189&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20189&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20189&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20189&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20189&r=isapi

Reply via email to