Re: Cleaning up streams when connection aborted

From: Date: Mon, 18 Mar 2002 16:51:58 +0000
Subject: Re: Cleaning up streams when connection aborted
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-81440@lists.php.net to get a copy of this message
On 18/03/02, "Zeev Suraski" <zeev@zend.com> wrote: > Well, you can register/unregister resources inside your stream > functions. That's probably the best way to go about it. > >So would it be better for the streams "subsystem" to keep track of > >the streams itself? Or even just register each stream as a resource > >during allocation of the stream? > The latter, definitely :) Good; that's what I thought :-) > Connection handling varies across different web servers. If you're really > paranoid, you can use > > HANDLE_BLOCK_INTERRUPTIONS() > and > HANDLE_UNBLOCK_INTERRUPTIONS() Should I bother with this in streams? > around your code, which at least under Apache, prevents certain async > signals from bothering us. Connection aborting is usually detected when > you fail writing information back to the browser, which means it's > typically detected synchronously. Which in turn means that you should be > safe :) That helps me get the picture. Thanks Zeev, --Wez.

« previous php.dev (#81440) next »