Pierre, > It affects how signals are handled within the engine, obvioulsy.
How signals are handled in the engine was already changed, the only thing being proposed here is that ext/pcntl uses that new feature. Cheers Joe On Mon, Jun 27, 2016 at 12:28 PM, Dmitry Stogov <dmi...@zend.com> wrote: > > > On 06/27/2016 02:05 PM, Pierre Joye wrote: > >> On Mon, Jun 27, 2016 at 5:08 PM, Joe Watkins <pthre...@pthreads.org> >> wrote: >> >>> Morning, >>> >>> How is the impact wider than ext/pcntl ? >>> >> The implementation is only in pctnl. The feature is used indirectly by >> the engine and makes it a core feature. Quote from the RFC: >> >> "Zend Engine in PHP 7.1 was extended with ability of safe time-out and >> interrupt handling. Actually, PHP VM checks for EG(vm_interrupt) flag >> on each loop iteration, user function entry or internal function exit, >> and call callback function if necessary. >> >> I propose to use this ability to implement asynchronous signal >> handling. Registered signal handlers are going to be called at some >> points during user script execution without any overhead." >> >> and the test: >> >> <?php >> ini_set("pcntl.async_signals", "1"); >> pcntl_signal(SIGTERM, function ($signo) { echo "Signal handler >> called!\n"; }); >> >> echo "Start!\n"; >> posix_kill(posix_getpid(), SIGTERM); >> $i = 0; // dummy >> echo "Done!\n"; >> >> It affects how signals are handled within the engine, obvioulsy. >> >> I have no doubt that this RFC will be accepted, by large, so it is not >> a big issue. However it does affect the engine so the 2/3 rule >> applies. >> > We use 2/3 vote for "a feature affecting the language itself (new syntax > for example)", not the engine internals. > > https://wiki.php.net/RFC/voting#voting > >