Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:2934 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36410 invoked from network); 28 Jun 2003 10:35:15 -0000 Received: from unknown (HELO milton.schell.de) (217.160.72.35) by pb1.pair.com with SMTP; 28 Jun 2003 10:35:15 -0000 Received: (qmail 21673 invoked by uid 501); 28 Jun 2003 10:35:14 -0000 Received: from unknown (HELO eco.foo) (80.143.47.226) by kdserv.de with SMTP; 28 Jun 2003 10:35:14 -0000 Received: from localhost (localhost [127.0.0.1]) by eco.foo (Postfix) with ESMTP id 912A32FEDE; Sat, 28 Jun 2003 12:35:13 +0200 (CEST) Date: Sat, 28 Jun 2003 12:35:13 +0200 (CEST) X-X-Sender: sas@eco.foo To: Dmitri Dmitrienko Cc: internals@lists.php.net In-Reply-To: <20030628095832.10285.qmail@pb1.pair.com> Message-ID: References: <20030628055230.56980.qmail@pb1.pair.com> <3EFD3147.6060104@webgenius.co.nz> <20030628095832.10285.qmail@pb1.pair.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] Apache 2 support From: sascha@schumann.cx (Sascha Schumann) On Sat, 28 Jun 2003, Dmitri Dmitrienko wrote: > > We could of course mutex every call to every external function. Then we > > could be reasonably sure it would work, and at the same time we could be > > sure that it was much slower than running it non-threaded. > > Any crash in an area protected by mutex would leave this mutex in > non-released state and all the rest threads trying to access that area would > be blocked forever. A crash in a multi-threaded program most likely leads to the termination of the process, so this is a non-issue. > BTW, is there any way for checking if a library does not create nor use any > global variables ? May be just running nm with non-stripped .so objects and > inspecting the resulting list ? Any other ideas ? nm displays global variables, including static function-scope variables. However, you cannot discern whether their use is save unless you audit the source code. The latter is also necessary, because a function can rely on external non-reentrant functions which renders the caller itself non-reentrant. - Sascha