in reply to How do you tell the parent process to stop it's HTTP transfer, when it forks off a child process?
Have you tried to display the web page first
(you can include the Content-Length header,
so that client knows how much to expect in the reply),
then do the email stuff. This way you don't need a fork.