Get rid of redundant output.

By checking waitpid's return value properly.