git: pthread_join(3): If the target thread is detached, return EINVAL.

Sascha Wildner swildner at crater.dragonflybsd.org
Sat Apr 21 03:43:51 PDT 2012


commit 3bfbb8cc7165e5a034f7f1de43eafd7ae88847d1
Author: Sascha Wildner <saw at online.de>
Date:   Sat Apr 21 12:17:07 2012 +0200

    pthread_join(3): If the target thread is detached, return EINVAL.
    
    We were returning ESRCH previously, which is wrong, as it indicates
    that the thread could not be found. Fix this in both libthread_xu
    and libc_r.
    
    See http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_join.html
    
    ----->8-----
    [ESRCH]
        No thread could be found corresponding to that specified by the
        given thread ID.
    
    ...
    
    [EINVAL]
        The value specified by thread does not refer to a joinable thread.
    -----8<-----

Summary of changes:
 lib/libc_r/uthread/uthread_join.c  |   13 +++++++++----
 lib/libthread_xu/thread/thr_join.c |    4 +---
 2 files changed, 10 insertions(+), 7 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3bfbb8cc7165e5a034f7f1de43eafd7ae88847d1


-- 
DragonFly BSD source repository





More information about the Commits mailing list