]> granicus.if.org Git - php/commitdiff
MFH: fix #39330 (apache2handler does not call shutdown actions before apache child...
authorAntony Dovgal <tony2001@php.net>
Fri, 1 Jun 2007 10:04:06 +0000 (10:04 +0000)
committerAntony Dovgal <tony2001@php.net>
Fri, 1 Jun 2007 10:04:06 +0000 (10:04 +0000)
NEWS
sapi/apache2handler/sapi_apache2.c

diff --git a/NEWS b/NEWS
index 0a1469c722cd8567a35bcfec5ef7624bebdde6aa..4a4313b6edfddb568184ec5011564445a0c2b250 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,8 @@
 PHP                                                                        NEWS
 |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
 ?? ??? 2007, PHP 5.2.4
+- Fixed bug #39330 (apache2handler does not call shutdown actions before 
+  apache child die). (isk at ecommerce dot com, Gopal, Tony)
 
 31 May 2007, PHP 5.2.3
 - Changed CGI install target to php-cgi and 'make install' to install CLI
index dcc0118b681aca94eb130d241acf77bb772f17d6..618a7c81b0b7b56a68bebe5a9a5cf77b5ef76cba 100644 (file)
@@ -651,11 +651,17 @@ zend_first_try {
        return OK;
 }
 
+static void php_apache_child_init(apr_pool_t *pchild, server_rec *s)
+{
+       apr_pool_cleanup_register(pchild, NULL, php_apache_server_shutdown, apr_pool_cleanup_null);
+}
+
 void php_ap2_register_hook(apr_pool_t *p)
 {
        ap_hook_pre_config(php_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
        ap_hook_post_config(php_apache_server_startup, NULL, NULL, APR_HOOK_MIDDLE);
        ap_hook_handler(php_handler, NULL, NULL, APR_HOOK_MIDDLE);
+       ap_hook_child_init(php_apache_child_init, NULL, NULL, APR_HOOK_MIDDLE);
 }
 
 /*