I need to write a code that will create the tree below by forking but the proccess P0 waits P2 before it terminates and P2 waits at least to of its kids!
P0
/ \
P1 P2
/|\
P3 P4 P5