rfc:additional-context-in-pcntl-signal-handler

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:additional-context-in-pcntl-signal-handler [2016/07/04 21:15] bishoprfc:additional-context-in-pcntl-signal-handler [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== PHP RFC: Additional Context in pcntl_signal Handler ====== ====== PHP RFC: Additional Context in pcntl_signal Handler ======
-  * Version: 0.2+  * Version: 1.0
   * Date: 2016-06-14   * Date: 2016-06-14
   * Authors: David Walker <dave@mudsite.com>, Bishop Bettini <bishop@php.net>   * Authors: David Walker <dave@mudsite.com>, Bishop Bettini <bishop@php.net>
-  * Status: Under Discussion+  * Status: Accepted
   * First Published at: http://wiki.php.net/rfc/additional-context-in-pcntl-signal-handler   * First Published at: http://wiki.php.net/rfc/additional-context-in-pcntl-signal-handler
  
Line 52: Line 52:
 ===== Proposed PHP Version(s) ===== ===== Proposed PHP Version(s) =====
  
-Next PHP 7.x.+Next PHP 7.x, currently 7.1.
  
  
Line 72: Line 72:
 ===== Discussion ===== ===== Discussion =====
  
-Instead of updating ''pcntl_signal'', it was suggested to add a method ''pcntl_sigaction'', which would "keep maximum compatibility and eliminate unnecessary additional overhead". This suggestion was later withdrawn as perhaps adding more complication than the patch itself, though a later [[https://github.com/php/php-src/pull/1978|PR]] ultimately would handle some parts of the suggestion. [[https://www.mail-archive.com/internals@lists.php.net/msg86504.html|Reference.]]+Instead of updating ''pcntl_signal'', it was suggested to add a method ''pcntl_sigaction'', which would "keep maximum compatibility and eliminate unnecessary additional overhead". This suggestion was later withdrawn as perhaps adding more complication than the patch itself, though a later [[https://github.com/php/php-src/pull/1985|PR]] addressed parts of the suggestion. [[https://www.mail-archive.com/internals@lists.php.net/msg86504.html|Reference.]] 
 + 
 +Performance was raised as a concern. Having run tests through callgrind there is an additional 0.0001% cost for the feature. The profiled code defined an empty function, set the handler, and triggered the signal. Passing the additional information resulted in 2000 extra instructions, out of a total 13 million. This seems negligible compared to the cost of acquiring the same information through other means (eg message queues, temporary files, etc.).
  
 ===== Open Issues ===== ===== Open Issues =====
Line 84: Line 86:
 Requires a 50%+1 majority. Requires a 50%+1 majority.
  
 +<doodle title="Provide additional context in pcntl signal handler?" auth="bishopb" voteType="single" closed="true">
 +   * Yes
 +   * No
 +</doodle>
 +
 +Voting shall close one week after opening on Thursday, July 14, 2016 at 23:59 UTC.
  
 ===== Patches and Tests ===== ===== Patches and Tests =====
  
-  * [[https://github.com/php/php-src/compare/master...bp1222:master|Current implementation with tests.]]+  * [[https://github.com/php/php-src/pull/1993|Implementation with tests.]]
  
  
Line 93: Line 101:
  
   * [[https://marc.info/?l=php-internals&m=146584196929126&w=2|Initial ping to php.internals]]   * [[https://marc.info/?l=php-internals&m=146584196929126&w=2|Initial ping to php.internals]]
 +  * [[https://marc.info/?l=php-internals&m=146670242109688&w=2|Discussion]]
rfc/additional-context-in-pcntl-signal-handler.1467666932.txt.gz · Last modified: 2017/09/22 13:28 (external edit)