|Welcome to the Monastery|
Re: Fork() Functionby zentara (Archbishop)
|on May 13, 2014 at 14:50 UTC||Need Help??|
In addition to the good advice given above, I would like to point out 1 little pitfall which you may encounter. When forking you often get the pid of the shell process invoked which then actually spawns another pid to run your program. So be aware that the pid reported back by fork, will probably be a shell's pid. The shell then has a child, which is your actual program. See Proc://KillFam for a way to kill the entire process tree which results from your fork.