Fixed a bug in the waitpid version where it would return incorrectly if a