Any chance of getting these applied to 5.0.x and 5.1?
Scott
Scott MacVicar wrote:
Path for 5.0.6, it would seem odd to have a different behavior on the
5.0.x branch.
Scott
Derick Rethans wrote:
On Thu, 8 Sep 2005, Stanislav Malyshev wrote:
DR>>But they can still do that.. With "shutdown functions" I meant
DR>>functions registered with register_shutdown_function().
Ah... This is smaller problem - register_shutdown_function() ones can
be called on "before dtors" stage.
Indeed, we've always done this too... I've a patch ready to commit for
PHP 5.1/6.0 for this:
diff -u -p -d -r1.640 main.c
--- main.c 5 Aug 2005 21:44:26 -0000 1.640
+++ main.c 8 Sep 2005 11:33:43 -0000
@@ -1197,16 +1197,16 @@ void php_request_shutdown(void *dummy)
EG(opline_ptr) = NULL;
EG(active_op_array) = NULL;
- /* 1. Call all possible __destruct() functions */
- zend_try {
- zend_call_destructors(TSRMLS_C);
- } zend_end_try();
-
- /* 2. Call all possible shutdown functions registered with
register_shutdown_function() */
+ /* 1. Call all possible shutdown functions registered with
register_shutdown_function() */
if (PG(modules_activated)) zend_try {
php_call_shutdown_functions(TSRMLS_C);
} zend_end_try();
+ /* 2. Call all possible __destruct() functions */
+ zend_try {
+ zend_call_destructors(TSRMLS_C);
+ } zend_end_try();
+
/* 3. Flush all output buffers */
zend_try {
php_end_ob_buffers((zend_bool)(SG(request_info).headers_only?0:1)
TSRMLS_CC);
Derick
------------------------------------------------------------------------
Index: main/main.c
===================================================================
RCS file: /repository/php-src/main/main.c,v
retrieving revision 1.604.2.22
diff -u -r1.604.2.22 main.c
--- main/main.c 16 Aug 2005 18:11:34 -0000 1.604.2.22
+++ main/main.c 6 Sep 2005 13:34:15 -0000
@@ -1194,14 +1194,14 @@
sapi_send_headers(TSRMLS_C);
} zend_end_try();
+ if (PG(modules_activated)) zend_try {
+ php_call_shutdown_functions(TSRMLS_C);
+ } zend_end_try();
+
zend_try {
zend_call_destructors(TSRMLS_C);
} zend_end_try();
- if (PG(modules_activated)) zend_try {
- php_call_shutdown_functions(TSRMLS_C);
- } zend_end_try();
-
if (PG(modules_activated)) {
zend_deactivate_modules(TSRMLS_C);
php_free_shutdown_functions(TSRMLS_C);
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php