Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13887 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 4215 invoked by uid 1010); 17 Nov 2004 18:01:56 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 4186 invoked from network); 17 Nov 2004 18:01:56 -0000 Received: from unknown (HELO dns1.systems.townnews.com) (208.229.121.1) by pb1.pair.com with SMTP; 17 Nov 2004 18:01:56 -0000 Received: from [10.81.10.35] (leepcI-244.sub-i.lee.net [12.163.60.244]) (authenticated bits=0) by dns1.systems.townnews.com (8.13.1/8.13.1) with ESMTP id iAHI1vSg024707 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 17 Nov 2004 12:02:00 -0600 Message-ID: <419B9205.1010108@townnews.com> Date: Wed, 17 Nov 2004 12:01:41 -0600 User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) X-Accept-Language: en-us, en MIME-Version: 1.0 To: internals@lists.php.net References: <20041116105341.19378.qmail@pb1.pair.com> <419A1A65.5070009@townnews.com> <20041117101326.91741.qmail@pb1.pair.com> In-Reply-To: <20041117101326.91741.qmail@pb1.pair.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] PHP broken pipe in fork From: sthomas@townnews.com (Shaun Thomas) user@domain.invalid wrote: > The child process doesn't use any database connection, just to run some > shell scripts, but it closes the connection anyway. You still don't get it. As a fork, the child process has all of the same resources as the parent before the fork occurred. When the child exits, it will close those resources, leaving the parent high and dry. > I initialy used PEAR DB and then _pconnect functions but the result is > the same. Not sure why that would be. Maybe the CLI doesn't honor _pconnect based functions, since pconnect was originally designed for keeping connections persistent across server processes. > Was the bug solved two years ago ? This is *not* a bug. It is a natural part of how PHP cleans up after itself. There are many ways to circumvent this, but are left as an exercise for the programmer. In our case, we did a test on the connection at all times before using it, and reconnected if the resource was ever closed or invalid; your mileage may vary. -- Shaun M. Thomas INN Database Administrator Phone: (309) 743-0812 Fax : (309) 743-0830 Email: sthomas@townnews.com Web : www.townnews.com