Problem
Use the man pages to see what the "wait" system call does (section 2).
e.g. > man 2 wait
Use the wait function to guarantee pids4.c will get its birth-parent's pid by not allowing the parent to die while the child is still running.
Make sure to use "wait", and don't use any "sleep" commands at all.
Where did you put the wait function call?
What was the exact syntax you used?
What headers does wait require?