php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #47198 pcntl_signal needs declare(ticks) which is deprecated since 5.3
Submitted: 2009-01-23 11:37 UTC Modified: 2009-03-27 02:57 UTC
Votes:2
Avg. Score:3.0 ± 2.0
Reproduced:1 of 2 (50.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: me at thomaskeller dot biz Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.3.0alpha3 OS: Linux
Private report: No CVE-ID: None
 [2009-01-23 11:37 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-24 12:21 UTC] lbarnaud@php.net
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.

 [2009-03-12 14:24 UTC] lsmith@php.net
All of the new functions are documented, however it would be useful to 
add a reference from register_tick_function to the replacement in the 
documentation.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 12:01:28 2024 UTC