diff options
author | jb <jb@FreeBSD.org> | 1998-06-25 00:04:21 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 1998-06-25 00:04:21 +0000 |
commit | 5dff8fae16ac00eb5ac00d3c00ab756078892b70 (patch) | |
tree | f354b71c2736db06df29408f83f15694fdcc94fc /lib/libc_r | |
parent | 2b2a057da4215bb5d50559c8773cb0aa1d6a1634 (diff) | |
download | FreeBSD-src-5dff8fae16ac00eb5ac00d3c00ab756078892b70.zip FreeBSD-src-5dff8fae16ac00eb5ac00d3c00ab756078892b70.tar.gz |
Add the missing {} that caused the function to return ESRCH if it
had to wait for the thread to exit and if the caller didn't want the
thread exit status.
Diffstat (limited to 'lib/libc_r')
-rw-r--r-- | lib/libc_r/uthread/uthread_join.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/uthread_join.c b/lib/libc_r/uthread/uthread_join.c index 83b0c2a..2043b76 100644 --- a/lib/libc_r/uthread/uthread_join.c +++ b/lib/libc_r/uthread/uthread_join.c @@ -77,11 +77,12 @@ pthread_join(pthread_t pthread, void **thread_return) _thread_kern_sched_state(PS_JOIN, __FILE__, __LINE__); /* Check if the thread is not detached: */ - if ((pthread->attr.flags & PTHREAD_DETACHED) == 0) + if ((pthread->attr.flags & PTHREAD_DETACHED) == 0) { /* Check if the return value is required: */ if (thread_return) /* Return the thread's return value: */ *thread_return = pthread->ret; + } else /* Return an error: */ ret = ESRCH; |