http-backend: cleanup writing to child process