[Lldb-commits] [lldb] r148617 - /lldb/trunk/source/Core/ConnectionFileDescriptor.cpp

Greg Clayton gclayton at apple.com
Fri Jan 20 18:28:13 PST 2012


Author: gclayton
Date: Fri Jan 20 20:28:13 2012
New Revision: 148617

URL: http://llvm.org/viewvc/llvm-project?rev=148617&view=rev
Log:
<rdar://problem/10711649>

A Small tweak to handle a zero timeout.


Modified:
    lldb/trunk/source/Core/ConnectionFileDescriptor.cpp

Modified: lldb/trunk/source/Core/ConnectionFileDescriptor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ConnectionFileDescriptor.cpp?rev=148617&r1=148616&r2=148617&view=diff
==============================================================================
--- lldb/trunk/source/Core/ConnectionFileDescriptor.cpp (original)
+++ lldb/trunk/source/Core/ConnectionFileDescriptor.cpp Fri Jan 20 20:28:13 2012
@@ -988,6 +988,13 @@
                 timeout.tv_sec = 0;
                 timeout.tv_usec = 0;
             }
+            else if (timeout_usec == 0)
+            {
+                // Sending in zero does an infinite timeout, so set this as low
+                // as we can go to get an effective zero timeout...
+                timeout.tv_sec = 0;
+                timeout.tv_usec = 1;
+            }
             else
             {
                 timeout.tv_sec = timeout_usec / TimeValue::MicroSecPerSec;





More information about the lldb-commits mailing list