Doc #55018 [NEW]: Missing semicolon from the end of the example script
| From: | pgl at yoyo dot org | Date: | Thu, 09 Jun 2011 16:17:32 +0000 |
| Subject: | Doc #55018 [NEW]: Missing semicolon from the end of the example script | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-6717@lists.php.net to get a copy of this message | ||
From:
Operating system:
PHP version: Irrelevant
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:Missing semicolon from the end of the example script
Description:
------------
---
From manual page: http://www.php.net/function.pcntl-signal#Examples
---
There is a missing semicolon from the end of the example script on the
pcntl_signal man page.
This line specifically:
echo "Done\n"
needs ; at the end.
Test script:
---------------
<?php
// tick use required as of PHP 4.3.0
declare(ticks = 1);
// signal handler function
function sig_handler($signo)
{
switch ($signo) {
case SIGTERM:
// handle shutdown tasks
exit;
break;
case SIGHUP:
// handle restart tasks
break;
case SIGUSR1:
echo "Caught SIGUSR1...\n";
break;
default:
// handle all other signals
}
}
echo "Installing signal handler...\n";
// setup signal handlers
pcntl_signal(SIGTERM, "sig_handler");
pcntl_signal(SIGHUP, "sig_handler");
pcntl_signal(SIGUSR1, "sig_handler");
// or use an object, available as of PHP 4.3.0
// pcntl_signal(SIGUSR1, array($obj, "do_something");
echo"Generating signal SIGTERM to self...\n";
// send SIGUSR1 to current process id
posix_kill(posix_getpid(), SIGUSR1);
echo "Done\n"
--
Edit bug report at http://bugs.php.net/bug.php?id=55018&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=55018&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=55018&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=55018&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=55018&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=55018&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=55018&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=55018&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=55018&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=55018&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=55018&r=support
Expected behavior: http://bugs.php.net/fix.php?id=55018&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=55018&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=55018&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=55018&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=55018&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=55018&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=55018&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=55018&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=55018&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=55018&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=55018&r=mysqlcfg