https://github.com/ashgti created 
https://github.com/llvm/llvm-project/pull/133811

There isn't any benefit to taking ownership of stdin and it may cause issues if 
`Transport` is dealloced.

>From 9053618204265ea71a6a30382937cff584f8c02d Mon Sep 17 00:00:00 2001
From: John Harrison <harj...@google.com>
Date: Mon, 31 Mar 2025 14:36:16 -0700
Subject: [PATCH] [lldb-dap] Do not take ownership of stdin.

There isn't any benefit to taking ownership of stdin and it may cause issues if 
`Transport` is dealloced.
---
 lldb/tools/lldb-dap/lldb-dap.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lldb/tools/lldb-dap/lldb-dap.cpp b/lldb/tools/lldb-dap/lldb-dap.cpp
index 062c3a5f989f3..a1d4f4f92e625 100644
--- a/lldb/tools/lldb-dap/lldb-dap.cpp
+++ b/lldb/tools/lldb-dap/lldb-dap.cpp
@@ -571,7 +571,7 @@ int main(int argc, char *argv[]) {
   }
 
   lldb::IOObjectSP input = std::make_shared<NativeFile>(
-      fileno(stdin), File::eOpenOptionReadOnly, true);
+      fileno(stdin), File::eOpenOptionReadOnly, false);
   lldb::IOObjectSP output = std::make_shared<NativeFile>(
       stdout_fd, File::eOpenOptionWriteOnly, false);
 

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to