From: Waldemar Kozaczuk <jwkozac...@gmail.com>
Committer: Waldemar Kozaczuk <jwkozac...@gmail.com>
Branch: master
pthreads: make implementation of pthread_attr_getdetachstate more correct
Signed-off-by: Waldemar Kozaczuk <jwkozac...@gmail.com>
---
diff --git a/libc/pthread.cc b/libc/pthread.cc
--- a/libc/pthread.cc
+++ b/libc/pthread.cc
@@ -642,7 +642,7 @@ int pthread_getattr_np(pthread_t thread, pthread_attr_t
*attr)
int pthread_attr_getdetachstate(const pthread_attr_t *attr, int
*detachstate)
{
auto a = from_libc(attr);
- *detachstate = a->detached;
+ *detachstate = a->detached ? PTHREAD_CREATE_DETACHED :
PTHREAD_CREATE_JOINABLE;
return 0;
}
--
You received this message because you are subscribed to the Google Groups "OSv
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to osv-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/osv-dev/000000000000b4ea2c058fd92749%40google.com.