From 5a7ec536c0ccb5c9df7a610806a2b202415ef125 Mon Sep 17 00:00:00 2001 From: "wtc%netscape.com" Date: Thu, 10 Dec 1998 19:58:23 +0000 Subject: [PATCH] In PR_JoinThread, we need to call pthread_detach after pthread_join under DCE threads because DCE threads' pthread_detach does not reclaim the terminated thread's resources. --- nsprpub/pr/src/pthreads/ptthread.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nsprpub/pr/src/pthreads/ptthread.c b/nsprpub/pr/src/pthreads/ptthread.c index e82e80c4dea..bafce7713fb 100644 --- a/nsprpub/pr/src/pthreads/ptthread.c +++ b/nsprpub/pr/src/pthreads/ptthread.c @@ -478,6 +478,10 @@ PR_IMPLEMENT(PRStatus) PR_JoinThread(PRThread *thred) PR_ASSERT(rv == 0 && result == NULL); if (0 == rv) { +#ifdef _PR_DCETHREADS + rv = pthread_detach(&id); + PR_ASSERT(0 == rv); +#endif _pt_thread_death(thred); } else