summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libthr/thread/thr_attr.c2
1 files changed, 2 insertions, 0 deletions
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));
OpenPOWER on IntegriCloud