It's possible that I'm missing something here, but I can't see why you would need to fork at all.
After you've outputted your redirect then closing STDOUT should allow the web server to consider the output for the client finished and return the result to the browser, so after that your script can carry on and do whatever needs to be done in the background.
Yeah, I had tried doing that earlier and it hadn't worked. However, I just tried it again and low and behold it worked. Now I don't have to deal with forking and sub processes.