Author: gclayton
Date: Mon Jan  5 18:21:29 2015
New Revision: 225224

URL: http://llvm.org/viewvc/llvm-project?rev=225224&view=rev
Log:
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>

Modified:
    lldb/trunk/source/Host/posix/HostThreadPosix.cpp

Modified: lldb/trunk/source/Host/posix/HostThreadPosix.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/HostThreadPosix.cpp?rev=225224&r1=225223&r2=225224&view=diff
==============================================================================
--- lldb/trunk/source/Host/posix/HostThreadPosix.cpp (original)
+++ lldb/trunk/source/Host/posix/HostThreadPosix.cpp Mon Jan  5 18:21:29 2015
@@ -35,12 +35,15 @@ HostThreadPosix::Join(lldb::thread_resul
     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;


_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to