Regarding your updated code: Since the parent is doing a waitpid(), you do not want to set up a SIGCHLD handler. Use either one or the other (I'd suggest the waitpid). If the waitpid reaps the child, the SIGCHLD wait call will hang waiting for yet another child to be reaped.
Comment on Re: Can I stop a backtick command but continue the script?