From db9594be6ec1797938c3e501bb29e7e953d6961a Mon Sep 17 00:00:00 2001 From: davidxu Date: Mon, 9 Jan 2006 03:59:51 +0000 Subject: Return real detached state. --- lib/libthr/thread/thr_attr.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/libthr/thread/thr_attr.c b/lib/libthr/thread/thr_attr.c index 9e65548..342d457 100644 --- a/lib/libthr/thread/thr_attr.c +++ b/lib/libthr/thread/thr_attr.c @@ -145,6 +145,8 @@ _pthread_attr_get_np(pthread_t pid, pthread_attr_t *dst) if ((ret = _thr_ref_add(curthread, pid, /*include dead*/0)) != 0) return (ret); attr = pid->attr; + if (pid->tlflags & TLFLAGS_DETACHED) + attr.flags |= PTHREAD_DETACHED; _thr_ref_delete(curthread, pid); memcpy(*dst, &attr, sizeof(struct pthread_attr)); -- cgit v1.1