I have a multi processed web server with processes that never end, I would like to check my code coverage on the whole project in a live environment (not only from tests).
Since you are willing to run your code differently for the test, why not add a way to end the process for the test? That seems like it will be simpler than trying to hack coverage.