[Lldb-commits] [PATCH] Fix ProcessIO test failures
labath at google.com
Wed Mar 11 04:13:01 PDT 2015
Hi clayborg, jingham,
There was a race condition regarding the output of the inferior process. The reading of the
output is performed on a separate thread, and there was no guarantee that the output will get
eventually consumed. Because of that, it was happening that calling Process::GetSTDOUT was not
returning anything even though the process was terminated and would definitely not produce any
further output. This was usually happening only under very heavy system load, but it can be
reproduced by placing an usleep in the stdio thread (Process::STDIOReadThreadBytesReceived).
This patch addresses this by adding synchronization capabilities to the Communication thread.
After calling Communication::SynchronizeWithReadThread one can be sure that all pending input has
been processed by the read thread. This function is then called after every public event which
stops the process to obtain the entire process output.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 11170 bytes
Desc: not available
More information about the lldb-commits