invoke waitpid() in parent