#47198 [Opn]: pcntl_signal needs declare(ticks) which is deprecated since 5.3
| From: | lbarnaud@php.net | Date: | Sat, 24 Jan 2009 12:21:59 +0000 |
| Subject: | #47198 [Opn]: pcntl_signal needs declare(ticks) which is deprecated since 5.3 | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-1752@lists.php.net to get a copy of this message | ||
ID: 47198
Updated by: lbarnaud@php.net
Reported By: me at thomaskeller dot biz
Status: Open
-Bug Type: PCNTL related
+Bug Type: Documentation problem
Operating System: Linux
PHP Version: 5.3.0alpha3
-Assigned To:
+Assigned To: lbarnaud
New Comment:
pcntl_signal_dispatch() has been added as a workaround for scripts
already using pcntl_signal(). It returns true, so that you can use it in
your main loop like this:
while (pcntl_signal_dispatch() && loop_condition);
pcntl_sigwaitinfo(), pcntl_sigtimedwait() and pcntl_sigprocmask() has
also been added to 5.3.
Previous Comments:
------------------------------------------------------------------------
[2009-01-23 11:37:59] me at thomaskeller dot biz
Description:
------------
To state the PHP docs on register_tick_function
(http://de2.php.net/manual/en/function.register-tick-function.php):
"5.3.0 Ticks are now deprecated and register_tick_function() now
throws an E_DEPRECATED notice."
However, ticks are needed for pcntl_signal to process signal interrupts
(pcntl_signal uses them since 4.3). Deprecating ticks will make cli
scripts written in PHP pretty much useless if there is no signal
handling available. The documentation also misses to outline
alternatives for signal handling from 5.3 onwards.
Reproduce code:
---------------
n/a
Expected result:
----------------
n/a
Actual result:
--------------
n/a
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47198&edit=1