symfony/symfony-standard — pull request #658 by lmcd (2014-05-09 10:10:48+00:00)
Title: Run $kernel->terminate after connection is closed in HHVM

In php-fpm, we can run cleanup code/blocking tasks after the HTTP connection is closed with `fastcgi_finish_request`. HHVM doesn't have this function, but it does have the counterpart `register_postsend_function`.

See here:
https://github.com/facebook/hhvm/blob/master/hphp/doc/extension.new_functions
https://github.com/facebook/hhvm/issues/1230

Note: haven't tested yet. Just putting it out there.