clean up dead child using wait syscall