I've noticed a couple of places in the code where ZEND_REGISTER_RESOURCE
is used to remember to cleanup streams, and then deletes the list entry
when it has completed what it was doing.

It's a nice idea, but it doesn't feel safe to me (probably because
I'm not 100% aware of the way that PHP handles the connection aborting),
since we can't guarantee that the stream allocation and resource
registration is atomic (can we?).

Should we consider removing the resource registration and instead have
the streams code keep a list of all the persistent/non-persistent streams
it has allocated, so that it can cleanup on request shutdown?

When dealing with persistent streams I'd need to cleanup in the module
shutdown, right?

Also, I'd appreciate it if someone that knows about the persistent
resource mechanism could bring me up to speed on what I should/should not
being doing with persistent streams (currently only pfsockopened streams
are persistent).

Thanks!

--Wez.


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

Reply via email to