TRQ-1605. Make monitor_route_retry_thread() check for the value of (pthread_t)-1 before checking if the process still exists, as -1 indicates that it doesn't.