|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-09-22 14:53 UTC] iliaa@php.net
[2002-09-23 12:25 UTC] colin at easydns dot com
[2002-09-23 18:31 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 06:00:02 2025 UTC |
Take this script: <? function aborted() { global $i; mail('user@example.com', 'aborted', 'conn_status: ' . (int)connection_status() . "\nI counted to $i" ); exit; } # register_shutdown_function('aborted'); $i = 0; while (true) { echo $i++ . "\n"; flush(); } ?> If run as is, it works as expected: happily counting away until it times out, or you abort the script. If you uncomment the register_shutdown_function line and abort the script part-way through, Apache doesn't seem to close the connection. And, in fact, all other Apache processes get "hung" up waiting for it. Running <i>apachectl server-status</i> shows this. Let me know if you need more info. (This was actually tested on 4.3.0-dev, built Aug 27 2002. I'm getting the current CVS version now, but I understand from other people that this will still not function.) - Colin