forked from OSchip/llvm-project
Fix being able to get a thread result when calling HostThreadPosix::Join(). It was broken when initially checked in by getting the thread result into a temporary variable and never doing anything with it. Most threads in LLDB don't look at their thread results, but launching processes in a terminal window on MacOSX does require getting a thread result and this broke "process launch --tty" on darwin.
<rdar://problem/19308966> llvm-svn: 225224
This commit is contained in:
parent
bcd960a1bc
commit
62f24e97bd
|
@ -35,12 +35,15 @@ HostThreadPosix::Join(lldb::thread_result_t *result)
|
|||
Error error;
|
||||
if (IsJoinable())
|
||||
{
|
||||
lldb::thread_result_t thread_result;
|
||||
int err = ::pthread_join(m_thread, &thread_result);
|
||||
int err = ::pthread_join(m_thread, result);
|
||||
error.SetError(err, lldb::eErrorTypePOSIX);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (result)
|
||||
*result = NULL;
|
||||
error.SetError(EINVAL, eErrorTypePOSIX);
|
||||
}
|
||||
|
||||
Reset();
|
||||
return error;
|
||||
|
|
Loading…
Reference in New Issue