================
@@ -326,8 +326,12 @@ static Status spawn_process(const char *progname, const 
FileSpec &prog,
   self_args.AppendArgument(llvm::StringRef("platform"));
   self_args.AppendArgument(llvm::StringRef("--child-platform-fd"));
   self_args.AppendArgument(llvm::to_string(shared_socket.GetSendableFD()));
-  launch_info.AppendDuplicateFileAction((int64_t)shared_socket.GetSendableFD(),
-                                        
(int64_t)shared_socket.GetSendableFD());
+#ifdef _WIN32
+  int fd = _open_osfhandle((intptr_t)shared_socket.GetSendableFD(), NULL);
----------------
slydiman wrote:

BTW, ProcessLauncherWindows::LaunchProcess() has no fork() and cannot execute 
any code in the child process. It just collecting HANDLEs and pass them to 
UpdateProcThreadAttribute(). The socket handle duplicating is executed in 
SharedSocket::CompleteSending().

https://github.com/llvm/llvm-project/pull/179274
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to