Actually use WIFEXITED.  I don't care too much about the code.