how to handle a zombie process

hi!

i am writing a c program which has the following structure:

main()
{
child1
child1.1
child2
child2.1
}

the child1.1 and 2.1 are becoming zombies...
how can i handle this...

thanx

Look into wait() or waitpid() I think that's what you want.