[all-commits] [llvm/llvm-project] d76f52: [lldb][Windows] Don't let the inferior inherit the...

Charles Zablit via All-commits all-commits at lists.llvm.org
Thu Jul 16 09:34:11 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d76f5249eaca89f73ff8e55783153a8376938abf
      https://github.com/llvm/llvm-project/commit/d76f5249eaca89f73ff8e55783153a8376938abf
  Author: Charles Zablit <c_zablit at apple.com>
  Date:   2026-07-16 (Thu, 16 Jul 2026)

  Changed paths:
    M lldb/tools/lldb-server/lldb-gdbserver.cpp

  Log Message:
  -----------
  [lldb][Windows] Don't let the inferior inherit the --pipe handle (#207024)

`lldb-server` writes its listening socket id to the `--pipe` handle and
then closes it. The parent process that spawned it reads the pipe until
EOF purely as a synchronization point (`"the server is now listening"`).

On Windows the inferior is launched with `bInheritHandles=TRUE` (it
needs the ConPTY handles), so it also inherited the pipe's write end.
That kept the write end open after `lldb-server` closed its own handle,
so the parent never saw EOF: it blocked until its read timeout and the
client's connection handshake timed out first.

This patch clears `HANDLE_FLAG_INHERIT` on the `--pipe` handle so the
inferior cannot keep the write end open, while leaving it valid for
lldb-server's own use.

rdar://180736036



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list