diff options
Diffstat (limited to 'htl/pt-join.c')
-rw-r--r-- | htl/pt-join.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/htl/pt-join.c b/htl/pt-join.c index c62019c..4e4798a 100644 --- a/htl/pt-join.c +++ b/htl/pt-join.c @@ -1,5 +1,5 @@ /* Wait for thread termination. - Copyright (C) 2000-2024 Free Software Foundation, Inc. + Copyright (C) 2000-2025 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -49,12 +49,18 @@ __pthread_join_common (pthread_t thread, void **status, int try, /* Rely on pthread_cond_wait being a cancellation point to make pthread_join one too. */ - while (pthread->state == PTHREAD_JOINABLE && err != ETIMEDOUT) + while (pthread->state == PTHREAD_JOINABLE && err != ETIMEDOUT && err != EINVAL) err = __pthread_cond_clockwait (&pthread->state_cond, &pthread->state_lock, clockid, abstime); pthread_cleanup_pop (0); + + if (err == EINVAL) + { + __pthread_mutex_unlock (&pthread->state_lock); + return err; + } } switch (pthread->state) |