Hi,
i've a small problem with the signal handler.
These short script demonstrate my problem.
#!/usr/local/bin/php
<?php
set_time_limit(0);
function signals($signo) {
switch($signo) {
case SIGTERM:
echo "Termination signal";
exit;
break;
case SIGINT:
echo "Interrupt from keyboard";
exit
break;
}
}
$result=pcntl_signal(SIGTERM, 'signals');
if ($result == false) echo 'could not install sighandler for TERM';
$result=pcntl_signal(SIGINT, 'signals');
if ($result == false) echo 'could not install sighandler for INT';
echo "goto loop ...\n";
$c=0;
while (true){
$c++;
usleep(1);
}
?>
The problem is, that the script doesnt exit when i'm
sending the TERM signal or pressing CTRL-C (INT signal).
I've test it with the lastest cvs version.
Any help?
Regards,
Steve
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php