Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:52479 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96986 invoked from network); 20 May 2011 11:29:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 May 2011 11:29:53 -0000 Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.22 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.22 smtp2.ist.utl.pt Linux 2.6 Received: from [193.136.128.22] ([193.136.128.22:57436] helo=smtp2.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9C/85-01014-FA056DD4 for ; Fri, 20 May 2011 07:29:53 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp2.ist.utl.pt (Postfix) with ESMTP id 27E6D700048A for ; Fri, 20 May 2011 12:29:47 +0100 (WEST) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp2.ist.utl.pt ([127.0.0.1]) by localhost (smtp2.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id vi4EDJe0c7+u for ; Fri, 20 May 2011 12:29:46 +0100 (WEST) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp2.ist.utl.pt (Postfix) with ESMTP id 49373700048D for ; Fri, 20 May 2011 12:29:46 +0100 (WEST) Received: from clk-0081.clk-domain (unknown [85.139.253.17]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id 296BA2008AF3 for ; Fri, 20 May 2011 12:29:46 +0100 (WEST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: internals@lists.php.net References: Date: Fri, 20 May 2011 12:29:45 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_I=2ES=2ET=2E?= Message-ID: In-Reply-To: User-Agent: Opera Mail/11.10 (Win32) Subject: Re: [PHP-DEV] Need karma for committing test patches From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") Em Fri, 20 May 2011 12:14:07 +0100, Pierre Joye escreveu: > On Fri, May 20, 2011 at 1:12 PM, Gustavo Lopes > wrote: > >> Now, I'm starting to think something in the line of your original patch >> is better. Of course, curl_multi_exec and the other options would have >> to be considered too. > > Yes, that's what I told Alexy on IRC as well. Especially as I don't > see much of interest in keeping streams aroundif they are not usable > anymore from a script. > It's not usable from the script, but if the stream represents e.g. a file or a socket, the side effect of it being written to would still be there. So the only case it would be completely useless is if it were a temporary stream. An interesting fact is that this bug could be "solved" rather simply in 5.3 by duplicating the zval (and therefore incrementing the refcount of the resource) instead of just incrementing the zval refcount of the stream. The reason is php fclose() used not to actually close the file if its resource refcount were > 1, but I changed that in trunk. Ultimately, making fclose() not really do its job seems very flawed to me and someone who really wanted could call fclose() twice to force the stream closed, but it's important to have in mind this change may have made some bugs more visible. -- Gustavo Lopes