Re: [RFC] Zend Signal Handling
| From: | Lucas Nealan | Date: | Tue, 29 Jul 2008 23:58:10 +0000 |
| Subject: | Re: [RFC] Zend Signal Handling | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-39448@lists.php.net to get a copy of this message | ||
I've updated the patch for Zend Signal Handling, the latest version is
available on the wiki rfc page:
http://wiki.php.net/rfc/zendsignals
The update solves the reentrance issue with using the a zend linked list in
the default signal handler. I've also added a debug only check, at least for
now, that will output a debug string during shutdown if for some reason any
of the handlers installed during startup are no longer present.
I've added a discoveries section describing other features that may cause
issue with Zend Signals or should be incorporated. These include SIGCHILD
handling and pctl_signal. Please read on the wiki for the complete details.
Full list of changes:
- Replaced zend ll queue with a pre-allocated internal queue (thx pcntl)
- Added shutdown check for replaced signal handlers
- Added errno protection to the existing sigchld_handler in main.c
- Zend Signal handling is now enabled by default if sigaction is present
during a non-zts build.
- Made the patch more TSRMLS correct even though ZTS won't work
- Critical section in zend_signal_handler_unblock via sigprocmask for queue
mgmt and so it's zend_signal_handler_defer call will be afforded the same
signal queuing as when called by the kernel
I've limitedly tested these changes and everything seems normal in gdb.
Unless I hear otherwise I believe this to be ready to commit.
-lucas