[Lldb-commits] [lldb] [lldb] Inherit DuplicateFileAction(HANDLE, HANDLE) handles on windows (PR #137978)

Dmitry Vasilyev via lldb-commits lldb-commits at lists.llvm.org
Fri May 2 13:45:07 PDT 2025


================
@@ -122,8 +123,14 @@ struct ForkLaunchInfo {
         ExitWithError(error_fd, "close");
       break;
     case FileAction::eFileActionDuplicate:
-      if (dup2(action.fd, action.arg) == -1)
-        ExitWithError(error_fd, "dup2");
+      if (action.fd != action.arg) {
----------------
slydiman wrote:

Probably it is better to add a new eFileAction*** instead of the condition `action.fd == action.arg`.

https://github.com/llvm/llvm-project/pull/137978


More information about the lldb-commits mailing list