PHP 4.0 Bug #3944: module shutdown runs before calling registered list destructors
| From: | tom dot anheyer at berlinonlin dot de | Date: | Tue, 28 Mar 2000 15:12:00 +0000 |
| Subject: | PHP 4.0 Bug #3944: module shutdown runs before calling registered list destructors | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-17319@lists.php.net to get a copy of this message | ||
From: tom.anheyer@berlinonlin.de
Operating system: Linux 2.2.14/Apache 1.3.11
PHP version: 4.0 Beta 4 Patch Level 1
PHP Bug Type: Dynamic loading related
Bug description: module shutdown runs before calling registered list destructors
while using modules loaded with dl() I notice that the module shutdown runs before calling any
registered list destructors. The module shutdown removes the destructor buckets from the destructors
list.
This results in the error log:
Unknown list entry type in request shutdown (19) in Unknown on line 0
The list destructor is not called. The Code works in the former PHP3 Module and I can't see a
major
difference to the code in ext/standard/dir.c.
Here is the code:
static int le_http;
static void http_destructor(php_http_request *preq)
{
...
}
PHP_MINIT_FUNCTION(http_init)
{
...
le_http = register_list_destructors(http_destructor,NULL);
...
}
DLEXPORT PHP_FUNCTION(http)
{
php_http_request *preq;
int handle;
...
preq = ...
handle = zend_list_insert(preq, le_http);
object_init_ex (return_value, http_class_entry_ptr);
add_property_resource (return_value, "handle", handle);
}