It would probably be a good idea to have p1 check that p2 is still alive (with kill or waitpid) once in a while
But, why is this needed, if a child process is terminated/killed a SIGCHLD will be delivered to the parent by default, so I don't think an explicit check for the existence of the child process is needed