Simplify handler child processes and make sure the http connection closes properly.