pthread_join(3): If the target thread is detached, return EINVAL.