Fix a race on process exit
Fix a race on process exit

Summary:
Process::SetExitStatus was popping the process io handler and resetting m_process_input_reader
shared pointer, which is not a safe thing to do as the function is called asynchronously and
other threads may be accessing the member variable. (E.g. if the process terminates really
quickly, the private state thread might only be in the process of pushing the handler on the
stack. Sometimes, this leads to deadlock, as the shared pointer's state gets corrupted by the
concurrent access.

Since the IOHandler will be popped anyway in Process:HandleProcessStateChangedEvent when the
exited event gets processed, doing the same in SetExitStatus seems to be unnecessary.

Reviewers: clayborg

Subscribers: lldb-commits

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

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@275165 91177308-0d34-0410-b5e6-96231b3b80d8

apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb