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

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


commit e2c759f416524cede49f1fad2ada269f79f353bc
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/e2c759f416524cede49f1fad2ada269f79f353bc


-- 
DragonFly BSD source repository





More information about the Commits mailing list