Sorry about the bug, but thanks for the fix.  Does this mean there is no test covering launching in a tty?  Maybe we need one?<br><div class="gmail_quote">On Mon, Jan 5, 2015 at 4:23 PM Greg Clayton <<a href="mailto:gclayton@apple.com">gclayton@apple.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: gclayton<br>
Date: Mon Jan  5 18:21:29 2015<br>
New Revision: 225224<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=225224&view=rev" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project?rev=225224&view=rev</a><br>
Log:<br>
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.<br>
<br>
<rdar://problem/19308966><br>
<br>
Modified:<br>
    lldb/trunk/source/Host/posix/<u></u>HostThreadPosix.cpp<br>
<br>
Modified: lldb/trunk/source/Host/posix/<u></u>HostThreadPosix.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/HostThreadPosix.cpp?rev=225224&r1=225223&r2=225224&view=diff" target="_blank">http://llvm.org/viewvc/llvm-<u></u>project/lldb/trunk/source/<u></u>Host/posix/HostThreadPosix.<u></u>cpp?rev=225224&r1=225223&r2=<u></u>225224&view=diff</a><br>
==============================<u></u>==============================<u></u>==================<br>
--- lldb/trunk/source/Host/posix/<u></u>HostThreadPosix.cpp (original)<br>
+++ lldb/trunk/source/Host/posix/<u></u>HostThreadPosix.cpp Mon Jan  5 18:21:29 2015<br>
@@ -35,12 +35,15 @@ HostThreadPosix::Join(lldb::<u></u>thread_resul<br>
     Error error;<br>
     if (IsJoinable())<br>
     {<br>
-        lldb::thread_result_t thread_result;<br>
-        int err = ::pthread_join(m_thread, &thread_result);<br>
+        int err = ::pthread_join(m_thread, result);<br>
         error.SetError(err, lldb::eErrorTypePOSIX);<br>
     }<br>
     else<br>
+    {<br>
+        if (result)<br>
+            *result = NULL;<br>
         error.SetError(EINVAL, eErrorTypePOSIX);<br>
+    }<br>
<br>
     Reset();<br>
     return error;<br>
<br>
<br>
______________________________<u></u>_________________<br>
lldb-commits mailing list<br>
<a href="mailto:lldb-commits@cs.uiuc.edu" target="_blank">lldb-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/lldb-commits</a><br>
</blockquote></div>