summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2007-06-28 17:23:07 +0000
committerAntony Dovgal <tony2001@php.net>2007-06-28 17:23:07 +0000
commit37e0738f3a80b738cabf90ab6fd660c15628cd10 (patch)
tree209ffd8326406cc17152ca7c395341309a3ba147
parent030252067e30cc727853621d62e25c984a64a77c (diff)
downloadphp-git-37e0738f3a80b738cabf90ab6fd660c15628cd10.tar.gz
MFH
-rw-r--r--sapi/apache2handler/sapi_apache2.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index 618a7c81b0..f1bd94322a 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -349,8 +349,7 @@ static sapi_module_struct apache2_sapi_module = {
STANDARD_SAPI_MODULE_PROPERTIES
};
-static apr_status_t
-php_apache_server_shutdown(void *tmp)
+static apr_status_t php_apache_server_shutdown(void *tmp)
{
apache2_sapi_module.shutdown(&apache2_sapi_module);
sapi_shutdown();
@@ -360,6 +359,15 @@ php_apache_server_shutdown(void *tmp)
return APR_SUCCESS;
}
+static apr_status_t php_apache_child_shutdown(void *tmp)
+{
+ apache2_sapi_module.shutdown(&apache2_sapi_module);
+#if defined(ZTS) && !defined(PHP_WIN32)
+ tsrm_shutdown();
+#endif
+ return APR_SUCCESS;
+}
+
static void php_apache_add_version(apr_pool_t *p)
{
TSRMLS_FETCH();
@@ -653,7 +661,7 @@ zend_first_try {
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);
+ apr_pool_cleanup_register(pchild, NULL, php_apache_child_shutdown, apr_pool_cleanup_null);
}
void php_ap2_register_hook(apr_pool_t *p)