================
@@ -423,6 +425,11 @@ int main_gdbserver(int argc, char *argv[]) {
       return EXIT_FAILURE;
     }
     unnamed_pipe = (pipe_t)Arg;
+#ifdef _WIN32
+    // Prevent the inferior we later launch from inheriting this pipe's write
+    // handle.
+    ::SetHandleInformation((HANDLE)unnamed_pipe, HANDLE_FLAG_INHERIT, 0);
----------------
Nerixyz wrote:

We don't check that the passed argument is actually a pipe. Should we check 
here this the passed handle is actually a pipe? I'm guessing if you pass an 
invalid value here, things will break down the line anyway, but this would 
provide a better error for users.

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

Reply via email to