Switch to STD{OUT,ERR}_FILENO for dup2 calls
Call waitpid in SIGCHLD handler