RE: [PATCH]apache_register_shutdown_function final version
| From: | Zeev Suraski | Date: | Tue, 31 Dec 2002 09:20:56 +0000 |
| Subject: | RE: [PATCH]apache_register_shutdown_function final version | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-93003@lists.php.net to get a copy of this message | ||
As you can see in bug #15209, the change that introduced this problem was that we started calling php_request_shutdown() in apache_module_main(), prior to calling it from php_apache_request_shutdown(). So, the place to put it is clearly php_apache_request_shutdown(), where it used to be called before.
The problem is by the time you would get to php_apache_request_shutdown(), the per-request memory manager is already deactivated, so any emalloc()'d memory you may have is already freed. I'm not sure how to tackle this in a server independent way...
Zeev
At 21:55 30/12/2002, Joseph Tate wrote:
That's no good. If I remove the sapi_close stuff, and try to execute the shutdown functions in php_apache_request_shutdown() all I get is stuff in the error log listing the "leaked" memory. The requested function does not get executed. Joseph -----Original Message----- From: Zeev Suraski [mailto:zeev@zend.com] Sent: Monday, December 30, 2002 1:57 PM Subject: RE: [PATCH]apache_register_shutdown_function final version Try looking at php_apache_request_shutdown() in mod_php4.c. It's our pool destructor. Zeev