Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:17319 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22582 invoked by uid 1010); 18 Jul 2005 14:57:36 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 22567 invoked from network); 18 Jul 2005 14:57:36 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jul 2005 14:57:36 -0000 X-Host-Fingerprint: 84.204.52.251 promo.hnet.spb.ru OpenBSD 3.0-3.4 Received: from ([84.204.52.251:42258] helo=promo.hnet.spb.ru) by pb1.pair.com (ecelerity 2.0 beta r(6227M)) with SMTP id 39/7E-61486-F53CBD24 for ; Mon, 18 Jul 2005 10:57:36 -0400 Received: from thinkpad (unknown [192.168.3.118]) by promo.hnet.spb.ru (Postfix) with ESMTP id 16A871BAC51; Mon, 18 Jul 2005 18:58:00 +0400 (MSD) To: "'Stanislav Malyshev'" , "'PHP Development'" Date: Mon, 18 Jul 2005 18:57:32 +0400 Message-ID: <000901c58ba9$0a1db4a0$ea02a8c0@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Subject: RE: [PHP-DEV] module startup problem in 5.1 From: dmitry@zend.com ("Dmitry Stogov") References: Hi Stas, We can reimplement zend_register_internal_module() to return zend_module_entry* instead of bool. (The same behavior is in dl() function). Thanks. Dmitry. > -----Original Message----- > From: Stanislav Malyshev [mailto:stas@zend.com] > Sent: Monday, July 18, 2005 5:16 PM > To: PHP Development > Subject: [PHP-DEV] module startup problem in 5.1 > > > I see very serious problem un current module registration/startup > functions in 5.1. > In 5.0, there was a function zend_startup_module which did > two things: 1. Register PHP module with the system 2. Run > startup function of the module > > Now, in 5.1 those functions got spearated. However, the > problem is that it > now looks like this: > > ZEND_API int zend_startup_module(zend_module_entry *module) > { > TSRMLS_FETCH(); > > if (zend_register_internal_module(module TSRMLS_CC) == SUCCESS && > zend_startup_module_ex(module TSRMLS_CC) == SUCCESS) { > return SUCCESS; > } > return FAILURE; > } > > The trouble here is that zend_register_internal_module stores > module in > internal hash as value, so when zend_startup_module_ex is > run, it runs not > on the value in the hash but on original value. This leads to > module_started being never set in the hash value on module > which was added > in runtime - meaning its destructor is never called on shutdown. > > Since zend_register_internal_module never returns the hash > value, I see no > easy way to fix this, but I think it must be fixed ASAP. > > -- > Stanislav Malyshev, Zend Products Engineer > stas@zend.com http://www.zend.com/ +972-3-6139665 ext.115 > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >