[Lldb-commits] [lldb] [lldb-dap] Ensure we do not print the close sentinel when closing stdout. (PR #126833)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 12 10:46:45 PST 2025
================
@@ -59,7 +64,10 @@ Error OutputRedirector::RedirectTo(std::function<void(StringRef)> callback) {
while (!m_stopped) {
ssize_t bytes_count = ::read(read_fd, &buffer, sizeof(buffer));
// EOF detected.
- if (bytes_count == 0)
+ if (bytes_count == 0 ||
+ (bytes_count == sizeof(kCloseSentinel) &&
+ std::memcmp(buffer, kCloseSentinel, sizeof(kCloseSentinel)) == 0 &&
+ m_fd == kInvalidDescriptor))
----------------
ashgti wrote:
Done.
https://github.com/llvm/llvm-project/pull/126833
More information about the lldb-commits
mailing list