Re: Extension API Dependency Interface

From: Date: Wed, 12 Aug 2009 22:29:37 +0000
Subject: Re: Extension API Dependency Interface
References: 1 2 3 4  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-6578@lists.php.net to get a copy of this message
Hi Varuna, Varuna Jayasiri wrote:
This includes support for dl(). The callbacks which depend on the loaded extension will be called when an extension is loaded through dl(). I have only tested this roughly so far, so there might be some problems with this.
One aspect I didn't think of till now was that dl() does have an unload event that could pose a problem if an API is called post-removal of that specific extension (when the code is no longer available in memory). Typically this would be more of a problem in a SAPI such as Apache, but latest versions should only support CGI and CLI which shouldn't have multiple request cycles per process. Embedded builds, however, could possible create this type of situation. An alternative implementation could be to have a unregister callback, but I think this is going down a pretty involved road for something so particular. Perhaps as a general rule, API calls should not be made in MSHUTDOWN code to avoid this situation? Do others on the list think we need more involved support for dl()'s, especially in something like a custom embed build? -shire

« previous php.pecl.dev (#6578) next »