[Lldb-commits] [lldb] [lldb][Windows] Don't let the inferior inherit the --pipe handle (PR #207024)
via lldb-commits
lldb-commits at lists.llvm.org
Thu Jul 2 01:31:02 PDT 2026
================
@@ -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
More information about the lldb-commits
mailing list