Fixed fork/waitpid/exit to work for a simple fork, parent waits, child exits case