Files
clang-p2996/lldb/source/Target
Pavel Labath a9a43373e1 Fix rare failure in TestProcessIO
Summary:
There was a race condition in Process class, where we would not wait for process stdout to
propagate fully before we would shut down the connection (repro case: slow down the stdio thread
by placing a sleep right at the end of the while loop in Communication::ReadThread). The Process
class already tried to solve this problem by synchronizing with the read thread in
Process::ShouldBroadcastEvent, but unfortunately the connection got closed before that in
Process::SetExitStatus. I solve this issue by delaying the connection shutdown until we get a
chance to process the event and synchronize. Alternatively, I could have moved the
synchronization point to an earlier point in SetExitStatus, but it seems safer to delay the
shutdown until other things get a chance to notice the process has exited.

Reviewers: clayborg, ovyalov

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D12558

llvm-svn: 246753
2015-09-03 09:30:17 +00:00
..
2015-09-03 08:46:55 +00:00
2015-09-03 09:30:17 +00:00
2014-07-01 21:22:11 +00:00
2014-07-08 18:05:41 +00:00
2015-07-22 00:16:02 +00:00
2015-07-14 01:09:28 +00:00