Check return value of pthread_detach().