Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14267 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95413 invoked by uid 1010); 4 Jan 2005 01:41:35 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 95372 invoked from network); 4 Jan 2005 01:41:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Jan 2005 01:41:35 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.4/2.6 Received: from ([80.74.107.235:58119] helo=mail.zend.com) by pb1.pair.com (ecelerity HEAD (r3992M)) with SMTP id BB/E9-27561-824F9D14 for ; Mon, 03 Jan 2005 20:40:57 -0500 Received: (qmail 21262 invoked from network); 4 Jan 2005 01:40:53 -0000 Received: from localhost (HELO andi-notebook.zend.com) (127.0.0.1) by localhost with SMTP; 4 Jan 2005 01:40:53 -0000 Message-ID: <5.1.0.14.2.20050103174037.026c7460@localhost> X-Sender: andi@localhost X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Mon, 03 Jan 2005 17:40:50 -0800 To: Wez Furlong ,Alan Knowles Cc: internals@lists.php.net In-Reply-To: <4e89b42605010106303c1650ed@mail.gmail.com> References: <41D64D24.4060407@akbkhome.com> <41D64D24.4060407@akbkhome.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] dl() usage for cli php5 From: andi@zend.com (Andi Gutmans) I can't quite remember the exact explanation but I think we have a chicken and the egg problem :'( At 09:30 AM 1/1/2005 -0500, Wez Furlong wrote: >This is still the broken shutdown order problem I've been moaning >about for some time; we're unloading the modules before we call the >dtors. > >If you unset or assign to null all references to objects in your >extension before the script ends, you should end up with no segfault. > >--Wez. > > >On Sat, 01 Jan 2005 15:11:32 +0800, Alan Knowles wrote: > > I'm getting segfaults at shutdown when using dl() with my extension - > > works perfectly if it's in php.ini (or if I run when compiled with > > --enable-debug > > > > a) is this a known issue? > > b) is it fixable for cli usage? > > > > I'm guessing this is because modules are destroyed before the objects > > that they created are . looking at main/main.c > > :php_request_shutdown_for_hook() - a temporary fix may be to check for > > sapi == cli and skip the zend_deactivate_modules, and add it to the > > sapi_deactivate_cli.. > > > > Regards > > Alan > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php