This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[hurd,commited 1/2] htl: Make joining self return EDEADLK
- From: Samuel Thibault <samuel dot thibault at ens-lyon dot org>
- To: libc-alpha at sourceware dot org
- Cc: Samuel Thibault <samuel dot thibault at ens-lyon dot org>, commit-hurd at gnu dot org
- Date: Mon, 10 Feb 2020 02:36:06 +0100
- Subject: [hurd,commited 1/2] htl: Make joining self return EDEADLK
---
htl/pt-join.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/htl/pt-join.c b/htl/pt-join.c
index 43878a3d52..ab77af52c1 100644
--- a/htl/pt-join.c
+++ b/htl/pt-join.c
@@ -30,6 +30,9 @@ __pthread_join (pthread_t thread, void **status)
struct __pthread *pthread;
int err = 0;
+ if (thread == pthread_self ())
+ return EDEADLK;
+
/* Lookup the thread structure for THREAD. */
pthread = __pthread_getid (thread);
if (pthread == NULL)
--
2.24.1