Add proper EOF handling to Communication & Connection classes:
Add bool member to Communication class indicating whether the
Connection should be closed on receiving an EOF or not. Update the
Connection read to return an EOF status when appropriate. Modify the
Communication class to pass the EOF along or not, and to close the
Connection or not, as appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@120723 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/driver/Driver.cpp b/tools/driver/Driver.cpp
index 29b50f0..abd51a5 100644
--- a/tools/driver/Driver.cpp
+++ b/tools/driver/Driver.cpp
@@ -1178,7 +1178,7 @@
// However, you don't need to do anything with the characters, since editline will dump these
// unconsumed characters after printing the prompt again in el_gets.
- SBCommunication master_out_comm("driver.editline");
+ SBCommunication master_out_comm("driver.editline", false);
master_out_comm.AdoptFileDesriptor(m_editline_pty.GetMasterFileDescriptor(), false);
master_out_comm.SetReadThreadBytesReceivedCallback(Driver::MasterThreadBytesReceived, this);