rfc:zendsignals

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
rfc:zendsignals [2008/08/05 10:25] – change patch date lucasrfc:zendsignals [2008/08/12 20:38] – Minor updates to patch, pcntl support section lucas
Line 5: Line 5:
   * Status: Under Discussion   * Status: Under Discussion
   * First Proposed by: [[http://markmail.org/message/3jg6cwqfghdlydhy|Rasmus Lerdorf]]   * First Proposed by: [[http://markmail.org/message/3jg6cwqfghdlydhy|Rasmus Lerdorf]]
-  * Source code: [[http://arnaud.lb.s3.amazonaws.com/php-5.3.0-alarms-0808051122.patch|PHP_5_3_0 patch]] [[http://arnaud.lb.s3.amazonaws.com/php-HEAD-alarms-0808051122.patch|PHP_HEAD patch]] (08-05-2008).+  * Source code: [[http://sizzo.org/~screen/patches/php-5.3.0-alarms-0808121020.patch|PHP_5_3_0 patch]] [[http://sizzo.org/~screen/patches/php-HEAD-alarms-0808121015.patch|PHP_HEAD patch]] (08-12-2008).
  
 ===== Introduction ===== ===== Introduction =====
Line 93: Line 93:
 ===== Discoveries ===== ===== Discoveries =====
 === pcntl extension signals === === pcntl extension signals ===
-The experimental pcntl extension allows signal handlers to be defined in PHP userspace via //[[http://docs.php.net/manual/en/function.pcntl-signal.php|pctnl_signal()]]//. The handler is installed via //signal// and any previously registered handlers for the specified signal are ignored. While this is technically incompatible with Zend Signals, if a handler is installed via //pctnl_signal// for signals SIGALRM, SIGHUP, SIGINT, SIGQUIT, SIGTERM, SIGUSR1, SIGUSR2, the deferred protection offered by Zend Signals will basically be disabled for that signal number+The pcntl extension allows signal handlers to be defined in PHP userspace via //[[http://docs.php.net/manual/en/function.pcntl-signal.php|pctnl_signal()]]//. The handler is installed via //signal// and any previously registered handlers for the specified signal are ignored. While this is technically incompatible with Zend Signals, if a handler is installed via //pctnl_signal// for signals SIGALRM, SIGHUP, SIGINT, SIGQUIT, SIGTERM, SIGUSR1, SIGUSR2, the deferred protection offered by Zend Signals will basically be disabled for that signal number.
- +
-Future versions of Zend Signal should improve //zend_signal()// so extensions such as pcntl can register signals through Zend and still protect critical sections.+
  
 Note: Although --enable-pcntl states "(CLI/CGI only)" in the config.m4, there is no actual enforcement of this at compile time. The extension can be running in any SAPI. Note: Although --enable-pcntl states "(CLI/CGI only)" in the config.m4, there is no actual enforcement of this at compile time. The extension can be running in any SAPI.
 +
 +Update: pcntl has been modified to register signals via //zend_signal()// when available. Critical sections will now continue to have deferred protection even after signals are registered via pcntl.
  
 === PHP SIGCHLD signal handler === === PHP SIGCHLD signal handler ===
Line 115: Line 115:
    - 2008-08-03 Lucas Nealan: Incorporated ZTS support by Arnaud Le Blanc, moved ini def to zend.c, added HEAD patch ([[http://sizzo.org/~screen/patches/php-5.3.0-alarms-0808010408.patch|prev patch]])    - 2008-08-03 Lucas Nealan: Incorporated ZTS support by Arnaud Le Blanc, moved ini def to zend.c, added HEAD patch ([[http://sizzo.org/~screen/patches/php-5.3.0-alarms-0808010408.patch|prev patch]])
    - 2008-08-05 Arnaud Le Blanc: Added zend_sigaction() and ported PCNTL to use it. ([[http://sizzo.org/~screen/patches/php-5.3.0-alarms-0808021704.patch|PHP_5_3_0 prev patch]] [[http://sizzo.org/~screen/patches/php-HEAD-alarms-0808021832.patch|PHP_HEAD prev patch]])    - 2008-08-05 Arnaud Le Blanc: Added zend_sigaction() and ported PCNTL to use it. ([[http://sizzo.org/~screen/patches/php-5.3.0-alarms-0808021704.patch|PHP_5_3_0 prev patch]] [[http://sizzo.org/~screen/patches/php-HEAD-alarms-0808021832.patch|PHP_HEAD prev patch]])
 +   - 2008-08-12 Lucas Nealan: Update patches to latest CVS, minor TWS fixes etc. ([[http://arnaud.lb.s3.amazonaws.com/php-5.3.0-alarms-0808051122.patch|PHP_5_3_0 prev patc]] [[http://arnaud.lb.s3.amazonaws.com/php-HEAD-alarms-0808051122.patch|PHP_HEAD prev patch]])
rfc/zendsignals.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1