|
Thanks annibuddha (was that how you spell it?) seeing bb666's post i thought i'd post this...
I had a bit of trouble as i added more children but decided to store the parent id at the start:
pid=getpid()
than later i just checked the variable which i understand would be in all the children against against getpid()
i.e. to make a child process stop and wait forever after it was created:
if(pid!=getpid()) //this is not the parent
for(;;)
then the processes just sit there until they are killed (hopefully )
Last edited by theultimatechuf; 01-24-2002 at 06:13 PM..
|