The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 01-24-2002
theultimatechuf theultimatechuf is offline
Registered User
  
 

Join Date: Jan 2002
Location: UK
Posts: 6
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..