(main): Use TEMP_FAILURE_RETRY with waitpid.