Em Fri, 20 May 2011 12:14:07 +0100, Pierre Joye <pierre....@gmail.com> escreveu:

On Fri, May 20, 2011 at 1:12 PM, Gustavo Lopes <glo...@nebm.ist.utl.pt> 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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to