http://qs321.pair.com?node_id=211484


in reply to Re: Understanding fork
in thread Understanding fork

In the parent process, fork() returns the process ID of the new child. So in that process, you redirect the user, and exit. (At least, I THINK you should exit, but you're falling out of that else clause in your sample, and doing the while twice...).

How do you prevent that?

Neil Watson
watson-wilson.ca